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!
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/env bash | |
################################################################################ | |
# Script to initiate (or connect to) a tmux session | |
############################################################################### | |
# Starts session and returns, or attaches to existing session name and exits. | |
function tm_session { # session name | |
#echo tmux start-server | |
tmux start-server | |
#echo tmux has-session -t $1 |
========================================== | |
BASH SCRIPTING ========================================== | |
========================================== TEST COMMAND | |
========================================== | |
Invoke: bash [options] file | |
Shebang: #!/usr/bin/env bash Test: test expression | |
In script: [ expression ] | |
========================================== Alternate: [[ espression ]] | |
LOOP Does not split string words | |
========================================== Does not expand pathglobs* |
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New new -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
[user] | |
name = Your Nmae | |
email = [email protected] | |
[core] | |
editor = vim | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
ui = auto |
#!/usr/bin/env ruby | |
# encoding: UTF-8 # 2nd line, says file has Unicode data and names | |
##################################################################### | |
# Ruby 1.8 Unicode Demonstration | |
##################################################################### | |
# Enable Unicode Support, or start with: ruby -Ku | |
$KCODE = "UTF-8" |
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
############################################################################### | |
# Ruby 1.9 Unicode Demonstration | |
############################################################################### | |
require 'rubygems' | |
require 'unicode' # gem unicode | |
require 'unicode_utils' # gem unicode_utils | |
require 'rchardet19' # gem rchardet19 |
#!/usr/bin/env bash | |
# | |
# Script to initiate (or connect to) a rails project | |
# tmux session. | |
if [[ "$1" != "" ]]; then | |
app=$1 | |
APPDIR=$HOME/src/$app | |
cd $APPDIR | |
else |
require 'resolv' | |
class Domain | |
def mxers(domain) | |
mxs = Resolv::DNS.open do |dns| | |
ress = dns.getresources(domain, Resolv::DNS::Resource::IN::MX) | |
ress.map { |r| [r.exchange.to_s, IPSocket::getaddress(r.exchange.to_s), r.preference] } | |
end | |
return mxs |