Hey! I saw this has been indexed by the search engines. It is a first draft of a post I ended up publishing on my blog at: Scaling PostgreSQL With Pgpool and PgBouncer
Thanks for stopping by!
| #!/usr/bin/python3 | |
| # | |
| # Query and display GCE metadata, clone from ec2metadata.py | |
| # | |
| from urllib import request as urllib_request | |
| metadata_url = "http://metadata.google.internal/computeMetadata/v1/instance/" | |
| {"providers":{"amazon":{"urlPattern":"^https?:\\/\\/(?:[a-z0-9-]+\\.)*?amazon(?:\\.[a-z]{2,}){1,}","rules":["p[fd]_rd_[a-z]*","qid","srs?","__mk_[a-z]{1,3}_[a-z]{1,3}","spIA","ms3_c","[a-z%0-9]*ie","refRID","colii?d","[^a-z%0-9]adId","qualifier","_encoding","smid","field-lbr_brands_browse-bin","ref_?","th","sprefix","crid","keywords","cv_ct_[a-z]+","linkCode","creativeASIN","ascsubtag","aaxitk","hsa_cr_id","sb-ci-[a-z]+","rnid","dchild","camp","creative","s"],"rawRules":["\\/ref=[^/?]*"],"referralMarketing":["tag"],"exceptions":["^https?:\\/\\/(?:[a-z0-9-]+\\.)*?amazon(?:\\.[a-z]{2,}){1,}\\/gp\\/.*?(?:redirector.html|cart\\/ajax-update.html|video\\/api\\/)","^https?:\\/\\/(?:[a-z0-9-]+\\.)*?amazon(?:\\.[a-z]{2,}){1,}\\/(?:hz\\/reviews-render\\/ajax\\/|message-us\\?|s\\?)"]},"amazon search":{"urlPattern":"^https?:\\/\\/(?:[a-z0-9-]+\\.)*?amazon(?:\\.[a-z]{2,}){1,}\\/s\\?","rules":["p[fd]_rd_[a-z]*","qid","srs?","__mk_[a-z]{1,3}_[a-z]{1,3}","spIA","ms3_c","[a-z%0-9]*ie","refRID","colii?d","[^a-z%0-9]adId","qual |
| #!/bin/bash | |
| # | |
| # Author: @xluffy | |
| # Purpose: Backup MySQL to local (or remote) | |
| # | |
| # example ~/.my.cnf | |
| # | |
| #[client] | |
| #user = root |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), 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(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), 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(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Hey! I saw this has been indexed by the search engines. It is a first draft of a post I ended up publishing on my blog at: Scaling PostgreSQL With Pgpool and PgBouncer
Thanks for stopping by!
| #!/bin/bash | |
| # | |
| # Purpose: Install common package | |
| # Author: @xluffy | |
| # | |
| # VAR | |
| declare -a pkgs=(aptitude apt-transport-https apt-utils autoconf automake bash-completion bison | |
| build-essential curl dialog dnsutils gcc git git-core htop iotop iputils-ping keychain | |
| libacl1-dev libevent-dev libffi-dev libgdbm-dev liblzo2-dev libncurses5-dev libreadline6-dev |
| docker build -- NEW --> docker image build | |
| docker history -- NEW --> docker image history | |
| docker images -- NEW --> docker image ls | |
| docker import -- NEW --> docker image import | |
| docker load -- NEW --> docker image load | |
| docker pull -- NEW --> docker image pull | |
| docker push -- NEW --> docker image push | |
| docker rmi -- NEW --> docker image rm | |
| docker save -- NEW --> docker image save | |
| docker tag -- NEW --> docker image tag |
| My name is Linus, and I am your God. - Linus Torvalds | |
| Nobody actually creates perfect code the first time around, except me. But there's only one of me. — Linus Torvalds | |
| Software is like sex: it's better when it's free. - Linus Torvalds | |
| Nvidia, fuck you! - Linus Torvalds | |
| Talk is cheap. Show me the code. - Linus Torvalds | |
| Rules of Optimization: Rule 1: Don't do it. Rule 2 (for experts only): Don't do it yet. — Michael A. Jacksno | |
| If debugging is the process of removing software bugs, then programming must be the process of putting them in. — Edsger Dijkstra | |
| Perl – The only language that looks the same before and after RSA encryption. — Keith Bostic | |
| On the seventh day, God said, "Ship it! We'll release patches later. — Josh Flachsbart | |
| It's not a bug, it's a feature! - Unknown |