Skip to content

Instantly share code, notes, and snippets.

@natelandau
natelandau / .bash_profile
Last active Oct 18, 2020
Mac OSX Bash Profile
View .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@zackdever
zackdever / gist:8701478
Created Jan 30, 2014
arc diff off another diff
View gist:8701478
taken directly from https://sites.google.com/a/khanacademy.org/forge/for-developers/code-review-policy/using-phabricator
Advanced topic: Dependent Phabricator reviews
Say you have an upstream called master, and a feature branch F1, and a second change that depends on F1, (call it F2).
git checkout master
git checkout -b F1
# work work
git commit -a
arc diff
anonymous
anonymous / gist:4567542
Created Jan 18, 2013
Reads a random Urban Dictionary Definition (Must be run from a Mac OS X Terminal)
View gist:4567542
curl -L www.urbandictionary.com/random.php | awk '$0 ~ /(<title>)|(\<div class\=\"definition\"\>)/{print}' | sed -e 's#<[^>]*>##g' | sed 's/Urban Dictionary\:\(.*\)/\1\, Definition:/' | say
@qtproduction
qtproduction / scrape.py
Created Sep 26, 2012
Retrive website from Google Cache without blocking IP
View scrape.py
#Retrive old website from Google Cache. Optimized with sleep time, and avoid 504 error (Google block Ip send many request).
#Programmer: Kien Nguyen - QTPros http://qtpros.info/kiennguyen
#change search_site and search_term to match your requirement
#Original: http://www.guyrutenberg.com/2008/10/02/retrieving-googles-cache-for-a-whole-website/
#!/usr/bin/python
import urllib, urllib2
import re
import socket
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active Oct 7, 2020
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
View osx-for-hackers.sh
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@pec1985
pec1985 / customnav.js
Created Jun 22, 2011
Custom Navigation Controller, compatible with Android and iPhone
View customnav.js
// Flags, is this for Android or iPhone?
var iPhone = false;
var Android = false;
if(Ti.Platform.osname == 'iphone'){
iPhone = true
};
if(Ti.Platform.osname == 'android'){
Android = true
};
@aurels
aurels / gist:843967
Created Feb 25, 2011
stream system command output to STDOUT (ruby)
View gist:843967
IO.popen('ant run') do |io|
while (line = io.gets) do
puts line
end
end
You can’t perform that action at this time.