Just run:
curl -ks https://gist.github.com/nicerobot/5652802/raw/install.sh | bash -
/** | |
* Primitive load-balancer to split Cypress specs across multiple runners. This script assumes that | |
* all your specs are in the folder '<project root>/cypress/integration'. It uses the number of | |
* tests per spec file as sole criteria to split specs between runners. | |
* | |
* This script accepts two arguments: the total number of runners and the index (starting from 0) of | |
* the current runner. Example: | |
* $ node cypress-partial.js 5 2 | |
* This command asks for specs to give to the third runner of five runners. | |
* The output of the script is a coma-separated list of specs that can be given to Cypress. Example: |
#To Decrypt Jenkins Password from credentials.xml | |
#<username>jenkins</username> | |
#<passphrase>your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J</passphrase> | |
#go to the jenkins url | |
http://jenkins-host/script | |
#In the console paste the script | |
hashed_pw='your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J' |
docker rmi $(docker images -q -f dangling=true) |
/* | |
******************************************************************************** | |
Golang - Asterisk and Ampersand Cheatsheet | |
******************************************************************************** | |
Also available at: https://play.golang.org/p/lNpnS9j1ma | |
Allowed: | |
-------- | |
p := Person{"Steve", 28} stores the value |
.ONESHELL: | |
.PHONEY: help set-env init update plan plan-destroy show graph apply output taint | |
help: | |
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
set-env: | |
@if [ -z $(ENVIRONMENT) ]; then\ | |
echo "ENVIRONMENT was not set"; exit 10;\ | |
fi |
Closure job = { | |
// Job Name | |
name "${stashProjectKey}-${projectName}-${branchSimpleName}" | |
// Where should jenkins run the job | |
label ('master') | |
// Where should Jenkins get the source code from | |
scm { | |
git { |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
Just run:
curl -ks https://gist.github.com/nicerobot/5652802/raw/install.sh | bash -
Example: You have a branch 'refactor' that is quite different from master. You can't merge all of the | |
commits, or even every hunk in any single commit or master will break, but you have made a lot of | |
improvements there that you would like to bring over to master. | |
# on master | |
> git co -b temp | |
# on temp | |
> git merge --no-commit --no-ff refactor |