git branch {tagname}-branch {tagname}
git checkout {tagname}-branch git add .
git ci -m "Fix included" # or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}| rabbitmqctl list_connections pid port state user vhost recv_cnt send_cnt send_pend name | awk '{print "rabbitmqctl close_connection \"" $1 "\" \"manually closing idle connection\"" | "/bin/bash" }' |
| #!/bin/bash | |
| rm /tmp/image-pull-secret.yaml | |
| login_cmd=$(aws ecr get-login) | |
| username=$(echo $login_cmd | cut -d " " -f 4) | |
| password=$(echo $login_cmd | cut -d " " -f 6) | |
| endpoint=$(echo $login_cmd | cut -d " " -f 9) | |
| auth=$(echo "$username:$password" | /usr/bin/base64) | |
| configjson="{ \"auths\": { \"${endpoint}\": { \"auth\": \"${auth}\" } } }" |
| # | |
| # Slightly tighter CORS config for nginx | |
| # | |
| # A modification of https://gist.github.com/1064640/ to include a white-list of URLs | |
| # | |
| # Despite the W3C guidance suggesting that a list of origins can be passed as part of | |
| # Access-Control-Allow-Origin headers, several browsers (well, at least Firefox) | |
| # don't seem to play nicely with this. | |
| # |
| #!/bin/bash | |
| # remove exited containers: | |
| docker ps --filter status=dead --filter status=exited -aq | xargs docker rm -v | |
| # remove unused images: | |
| docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs docker rmi --force | |
| # remove unused volumes: | |
| find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <( |
| // haversin(θ) function | |
| func hsin(theta float64) float64 { | |
| return math.Pow(math.Sin(theta/2), 2) | |
| } | |
| // Distance function returns the distance (in meters) between two points of | |
| // a given longitude and latitude relatively accurately (using a spherical | |
| // approximation of the Earth) through the Haversin Distance Formula for | |
| // great arc distance on a sphere with accuracy for small distances | |
| // |
| #!/bin/bash | |
| # Install parallel on CentOS 6. | |
| # Assumes you are root. Prefix w/ sudo if not. | |
| cd /etc/yum.repos.d/ | |
| #wget http://download.opensuse.org/repositories/home:tange/CentOS_CentOS-5/home:tange.repo | |
| wget http://download.opensuse.org/repositories/home:/tange/CentOS_CentOS-6/home:tange.repo | |
| yum install parallel |
| ROUND((RAND() * (max-min))+min) |
| class throttle(object): | |
| """ | |
| Decorator that prevents a function from being called more than once every | |
| time period. | |
| To create a function that cannot be called more than once a minute: | |
| @throttle(minutes=1) | |
| def my_fun(): | |
| pass |
| . | |
| ├── actions | |
| ├── stores | |
| ├── views | |
| │ ├── Anonymous | |
| │ │ ├── __tests__ | |
| │ │ ├── views | |
| │ │ │ ├── Home | |
| │ │ │ │ ├── __tests__ | |
| │ │ │ │ └── Handler.js |