Skip to content

Instantly share code, notes, and snippets.

View tsuz's full-sized avatar

T Suzuki tsuz

  • Tokyo, Japan
  • 15:33 (UTC +09:00)
View GitHub Profile
@mbinna
mbinna / podforceupdate.sh
Created December 4, 2012 09:43
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@javiervidal
javiervidal / gist:3871062
Created October 11, 2012 08:47
vi cheatsheet
INSERTING TEXT
ESC command mode
i Insert before cursor
I Insert before line
a Append after cursor
A Append after line
o Open blank line below the cursor
O Open blank line above the cursor
@sindresorhus
sindresorhus / countrycode-latlong-array.json
Created November 5, 2011 16:03
Country codes (ISO 3166) to latitude longitude - converted from http://www.maxmind.com/app/country_latlon
{
"ad": [
"42.5000",
"1.5000"
],
"ae": [
"24.0000",
"54.0000"
],
"af": [
@penguinboy
penguinboy / Object Flatten
Created January 2, 2011 01:55
Flatten javascript objects into a single-depth object
var flattenObject = function(ob) {
var toReturn = {};
for (var i in ob) {
if (!ob.hasOwnProperty(i)) continue;
if ((typeof ob[i]) == 'object') {
var flatObject = flattenObject(ob[i]);
for (var x in flatObject) {
if (!flatObject.hasOwnProperty(x)) continue;