gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Query { | |
constructor(coll) { | |
this.coll = coll; | |
} | |
getCollection() { | |
return this.coll; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:7.9.0 | |
RUN apt-get update && apt-get install -y build-essential wget curl libroot-core-dev vim | |
ADD bashrc /root/.bashrc | |
CMD "/bin/bash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) install npm packages | |
2) update brunch-config.js | |
3) remove Bootstrap from web/static/css/app.css | |
4) rename web/static/css/app.css to web/static/css/app.scss | |
5) update web/static/css/app.scss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find and replace. Case insenstive. This searchs for elixir files | |
grep --color -Rl --include=*.{yml,exs,ex,eex} "searchstring" . | xargs sed -i "" 's/searchterm/replaceterm/g' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
content_type = "quicktime/mov" | |
headers = %{ | |
:"content_type" => content_type, | |
:"x-amz-acl" => "private", | |
:"x-amz-server-side-encryption" => "AES256" | |
} | |
IO.inspect headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl s_client -connect HOSTNAME:443 -showcerts -sess_out ~/Downloads/HOSTNAME.cert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func getReturnArg(methodWatch *MethodWatch, idx int, data interface{}, defaultValue interface{}) { | |
dataValue := reflect.ValueOf(data) | |
argsValue := reflect.ValueOf(methodWatch.ReturnArgs[idx]) | |
if dataValue.Kind() != reflect.Ptr { | |
panic(errors.New("result must be a pointer")) | |
} | |
dataElem := dataValue.Elem() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
list=( $(docker-machine ls | grep Running | awk '{ print $1 }') ) | |
for i in "${list[@]}"; do | |
ip=$(docker-machine ip $i) | |
#remove line matching ip | |
sudo sed -i '' '/'$ip'/d' /etc/hosts | |
#insert ip/host on last line | |
sudo sed -i -e '$a\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#Usage docker-machine-update-hosts.sh hosts.conf default | |
#arg1 is a configuration file with hosts | |
#arg2 is the docker-machine name e.g. default | |
DOCKER_IP=$(docker-machine ip $2) | |
echo "$2 ip: $DOCKER_IP" | |
#Remove existing lines from hosts | |
while IFS='' read -r line || [[ -n "$line" ]]; do |