This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#iphone only | |
convert -resize 58x58 1024.png 58.png | |
convert -resize 87x87 1024.png 87.png | |
convert -resize 80x80 1024.png 80.png | |
convert -resize 120x120 1024.png 120.png | |
convert -resize 180x180 1024.png 180.png | |
convert -resize 40x40 1024.png 40.png | |
convert -resize 60x60 1024.png 60.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in *@2x.png | |
do | |
if [ ! -f ${i/@2x.png/}.png ] | |
then | |
convert $i -resize 50% ${i/@2x.png/}.png | |
fi | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tds = document.getElementsByTagName("td"); for (var i=0;i<tds.length;i++) {var td = tds[i]; if (td.attributes["title"]) {var name = td.parentNode.getElementsByClassName("name")[0].getElementsByTagName("span")[0].firstChild.nodeValue; console.log(td.attributes["title"].nodeValue+","+name);}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ok | |
[an_array objectAtIndex:i] | |
//better | |
an_array[i] | |
//ok | |
[dict objectForKey:@"foo"] | |
//better | |
dict[@"foo"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import glob | |
import os | |
import subprocess | |
folders = glob.glob("*") | |
for f in folders: | |
if os.path.isdir(f): | |
config = f+"/.git/config" | |
if not os.path.exists(config): | |
print "%s appears not to be a Git repo" % f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import fnmatch | |
import os | |
import re | |
path = "." | |
files = [os.path.join(dirpath, f) | |
for dirpath, dirnames, files in os.walk(path) | |
for f in fnmatch.filter(files, '*.h')+fnmatch.filter(files, '*.m')] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/Users/matt/Library/Application Support/Skype/USERNAME/main.db | |
DELETE FROM Messages WHERE timestamp>strftime('%s', 'now') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://adndevblog.typepad.com/cloud_and_mobile/2012/06/android.html | |
* Start Parallels Desktop with the Android 4 image | |
* Run terminal emulator -> netcfg | |
* Check the eth0 IP (e.g. 192.168.1.167) | |
On Mac | |
```` | |
cd /Applications/android/sdk/platform-tools | |
./adb connect 192.168.1.167 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import calendar | |
from datetime import datetime, timedelta | |
#lists all files above 10MB in your slack files repo | |
#based on https://www.shiftedup.com/2014/11/13/how-to-bulk-remove-files-from-slack | |
_token = "" | |
_domain = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"code": "ad", | |
"description": "", | |
"name": "Andorra", | |
"callingCodes": [ | |
"+376" | |
], | |
"currencies": [ | |
"Euro" |
OlderNewer