mvn dependency:go-offline -fae # without compilation
mvn install -fae
mvn install -fn
mvn clean install -Dmaven.main.skip -Dmaven.test.skip
-fae - fail at end
-fn - fail never
mvn dependency:go-offline -fae # without compilation
mvn install -fae
mvn install -fn
mvn clean install -Dmaven.main.skip -Dmaven.test.skip
-fae - fail at end
-fn - fail never
e.g.
mvn dependency:get -DgroupId=org.springframework -DartifactId=spring-web -Dversion=6.1.6 -Dclassifier=sources -Dpackaging=jar
List all pods:
gitk <one_branch>...<second_branch> - show commits between branches
gitk --all - show changes from all branches
gitk -- some/path/to/filter - filter by path
Put inside console:
setTimeout(()=>{debugger;}, 5000)
and the whole site will freeze after 5 seconds.
mvn dependency:sources
mvn dependency:resolve -Dclassifier=javadocmvn dependency:tree -Dmaven.main.skip -Dmaven.test.skip
source
echo -e "one\ntwo" | awk '{ printf("\x27%s\x27,",$0) }'
source
E.g. if you want to install Windows Professional Box on computer with Windows Home OEM:
1. Create bootable pendrive with Windows from DVD.
2. Create file /sources/PID.txt with content:
[PID] Value=[youre product key here]
java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=duration=60s,filename=myrecording.jfr -jar app.jarsource
git log --onelineCopy SHA of first commit and next (it's reset your local repo state withouch changing files):
git reset --soft <SHA of first commit>Check that everything to commit is green:
git statusCommit your changes (--amend fixes last commit), you can change commit message by adding "-m <your new message>":
git commit --amendPush your changes:
git push --force
@Bean
public MessageSource messageSource() {
return new MessageSourceAutoConfiguration().messageSource();
}
@Bean(name = "validator")
public LocalValidatorFactoryBean validator()
{
LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
bean.setValidationMessageSource(messageSource());
return bean;
}
@Override
public Validator getValidator()
{
return validator();
}
and in validation annotation use:
@NotBlank(message = "{not.blank.message}")
private String foo;
In your classloader put file /messages_en.properties:
not.blank.message=Custom not blank message
xargs strips single quote mark from input, so if you want pass some data by xargs you will se error:
user:~/$ echo "This is single quote: '" | xargs -I {} echo {}
xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option
To do this properly it is necessary to add "-0" parameter:
user:~/$ echo "This is single quote: '" | xargs -0 -I {} echo {}
This is single quote: '
Or use sed:
user:~/$ echo "This is single quote: '" | sed "s/'/\\\\'/g" | xargs -I {} echo {}
This is single quote: '
Et voilà!
python -m SimpleHTTPServeror:
server -p 3000Please install before:
npm install serve -g
<p:remoteCommand name="remoteCommandName" actionListener="#{mBean.remoteCommandActionlistener}" />
Backing bean code:
public void remoteCommandActionlistener() {
String param1 = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("param1");
String param2 = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("param2");
System.out.println("param1: " + param1 + ", param2: " + param2);
}
JavaScript call:
remoteCommandName([{name: 'param1', value: 'value1'}, {name: 'param2', value: 'value2'}])
<meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="expires" content="now" /> <meta http-equiv="last modified" content="now" /> <meta http-equiv="expires" content="0" />