I hereby claim:
- I am mhemmings on github.
- I am mhemmings (https://keybase.io/mhemmings) on keybase.
- I have a public key whose fingerprint is EF6F 5F5D D3AC D8A2 6FA8 F6B9 1401 546F C018 6858
To claim this, I am signing this object:
/** | |
* Sets the opacity of the view. This is a value from 0 to 1, where 0 means the view is | |
* completely transparent and 1 means the view is completely opaque. | |
* | |
* @param alpha The opacity of the view. | |
* @param view The view to change. | |
* | |
*/ | |
@TargetApi(Build.VERSION_CODES.HONEYCOMB) | |
public void setOpacity(View view, float alpha) { |
#!/bin/bash | |
usage() { | |
printf "%s\n" "Usage: $0 [-m] [-e] [-o] [-c] [-d]" | |
printf "\t%s\n\t%s\n\t%s\n\t%s\n" \ | |
"-m MySQL only" "-e English only" "-o Output file" \ | |
"-c CSS file to download" "-d Auto-delete time (minutes)" | |
exit 1 | |
} |
upstream app_name { | |
# where the app is running | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 0.0.0.0:80; | |
server_name domain.com; | |
access_log /var/log/nginx/app_name.log; |
; CNAME Records | |
mail 3600 IN CNAME ghs.google.com. | |
calendar 3600 IN CNAME ghs.google.com. | |
docs 3600 IN CNAME ghs.google.com. | |
; MX Records | |
@ 3600 IN MX 10 ASPMX.L.GOOGLE.COM. | |
@ 3600 IN MX 20 ALT1.ASPMX.L.GOOGLE.COM. | |
@ 3600 IN MX 20 ALT2.ASPMX.L.GOOGLE.COM. | |
@ 3600 IN MX 30 ASPMX2.GOOGLEMAIL.COM. |
var aTags = document.getElementsByTagName('a'); | |
for (var i = 0; i < aTags.length; i++) { | |
aTags[i].addEventListener('click', function (e) { | |
chrome.tabs.create({url: e.target.href}); | |
}); | |
} |
I hereby claim:
To claim this, I am signing this object:
Sony VPCF11J0E. Just shy of £1000 when new.
alias work='echo -e "127.0.0.1 www.facebook.com\n127.0.0.1 twitter.com" | sudo tee -a /etc/hosts > /dev/null' |
Copy Android drawable assets from one directory to another using the standard drawables-hdpi
, drawables-xhdpi
etc
It can be a pain to copy new assets into your Android project when they are provided in the correct dpi directory structure.
Inside the source res directory, you should have child directorys of drawables-hdpi
, drawables-xhdpi
etc which each contain the asset needed to copy. The destination directory should also be the res directory containing each drawables directory.
Example:
./cp-drawables.sh img_to_copy.png /path/to/res/dir
Will execute (and print out):
sed -i -e "s/WORD//g" /Users/$(whoami)/Library/Spelling/LocalDictionary |