- Configure Gmail in you gitconfig:
[sendemail]
smtpserver = smtp.gmail.com
smtpserverport = 587
smtpencryption = tls
smtpuser = <gmail email address>
from = <email address for From: field>
require 'aws-sdk' | |
# This assumes you have ~/.aws/credentials with a profile called production | |
# granting you read access to the DynamoDB resource. | |
client = Aws::DynamoDB::Client.new(region: 'us-west-2', profile: 'production') | |
MC_4501 = %w( | |
4fd39d51-07c4-4b26-b5e6-e3f486017580 | |
0e626b9d-6cd7-4d45-b4d6-ff5c1e1389a7 | |
cb57c61c-d2f6-4331-aab2-40e9af9d075a |
args */**/*.coffee | |
argdo %s/find/replace/ge | |
wqal |
▶ brew list -1 | while read line; do brew unlink $line; brew link $line; done | |
Unlinking /usr/local/Cellar/appledoc/2.2... 0 links removed | |
Linking /usr/local/Cellar/appledoc/2.2... 1 symlinks created | |
Unlinking /usr/local/Cellar/autoconf/2.69... 0 links removed | |
Linking /usr/local/Cellar/autoconf/2.69... 18 symlinks created | |
Unlinking /usr/local/Cellar/bash-completion/1.3... 184 links removed | |
Linking /usr/local/Cellar/bash-completion/1.3... 182 symlinks created | |
Unlinking /usr/local/Cellar/bgrep/0.2... 0 links removed | |
Linking /usr/local/Cellar/bgrep/0.2... 1 symlinks created | |
Unlinking /usr/local/Cellar/binutils/2.24... 49 links removed |
[sendemail]
smtpserver = smtp.gmail.com
smtpserverport = 587
smtpencryption = tls
smtpuser = <gmail email address>
from = <email address for From: field>
require 'irb/ext/save-history' | |
IRB.conf[:SAVE_HISTORY] = 99999 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-history" |
/\%(#\)\@!\zs"\(.\{-}\)" |
find . -name '*.*' -type f -print | while read file; do | |
hash=$(sha1sum $file | awk '{print $1}'); | |
mkdir -p hashed; | |
cp $file hashed/${file%.*}-$hash.${file/*.}; | |
done |
// chef recipe installed latest varnish by default which is broken, revert to 2.10 | |
for i in {list of servers}; do ssh root@$i "export DEBIAN_FRONTEND=noninteractive; sudo apt-get -q -y remove varnish; sudo apt-get -q -y install libvarnish1=2.1.0-2ubuntu0.1; sudo apt-get -q -y install varnish=2.1.0-2ubuntu0.1"; done; | |
// may want to remove varnish config files prior if defaults are going to be used |
:'<,'> s/x\(.*ACTIVE | \)\(.\{-}\d\)\s*| \(.*\)/role :app, '\2', # \1 \3/ | |
turns | |
x| 1111 | yyy-yyy-staging-app83 | ACTIVE | 192.168.0.1 | 10.10.10.10 | | |
to | |
role :app, '192.168.0.1' # | 1111 | xxx-xxx-staging-app83 | ACTIVE | 10.10.10.10 | |
/* Pinterest urls need to be URI encoded, then URI component encoded. | |
*/ | |
replace('{shareUrl}', escape(shareObj.shareUrl)).replace('{imageUrl}', encodeURIComponent(encodeURI(shareObj.imageUrl))).replace('{shareText}', escape(shareObj.shareText)); |