brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
| #Refer: http://www.linuxfoundation.org/collaborate/workgroups/networking/netem#Delaying_only_some_traffic | |
| #Refer: http://www.bomisofmab.com/blog/?p=100 | |
| #Refer: http://drija.com/linux/41983/simulating-a-low-bandwidth-high-latency-network-connection-on-linux/ | |
| #Setup the rate control and delay | |
| sudo tc qdisc add dev lo root handle 1: htb default 12 | |
| sudo tc class add dev lo parent 1:1 classid 1:12 htb rate 56kbps ceil 128kbps | |
| sudo tc qdisc add dev lo parent 1:12 netem delay 200ms | |
| #Remove the rate control/delay | |
| sudo tc qdisc del dev lo root |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| /* ******************************************************************************************* | |
| * THE UPDATED VERSION IS AVAILABLE AT | |
| * https://github.com/LeCoupa/awesome-cheatsheets | |
| * ******************************************************************************************* */ | |
| // 0. Synopsis. | |
| // http://nodejs.org/api/synopsis.html |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
| """ | |
| Python script for batch geocoding of addresses using the Google Geocoding API. | |
| This script allows for massive lists of addresses to be geocoded for free by pausing when the | |
| geocoder hits the free rate limit set by Google (2500 per day). If you have an API key for paid | |
| geocoding from Google, set it in the API key section. | |
| Addresses for geocoding can be specified in a list of strings "addresses". In this script, addresses | |
| come from a csv file with a column "Address". Adjust the code to your own requirements as needed. | |
| After every 500 successul geocode operations, a temporary file with results is recorded in case of | |
| script failure / loss of connection later. | |
| Addresses and data are held in memory, so this script may need to be adjusted to process files line |
| # Installation --- | |
| # 1. In Bitbucket, add $FTP_USERNAME $FTP_PASSWORD and $FTP_HOST as environment variables. | |
| # 2. Commit this file to your repo | |
| # 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will | |
| # push everything and initial GitFTP) | |
| # | |
| # Usage --- | |
| # - On each commit to master branch, it'll push all files to the $FTP_HOST | |
| # - You also have the option to 'init' (from Bitbucket Cloud) - pushes everything and initialises | |
| # - Finally you can also 'deploy-all' (from Bitbucket Cloud) - if multiple deploys fail, you |