Skip to content

Instantly share code, notes, and snippets.

@bryanl
bryanl / tmux.conf
Created November 30, 2010 05:17
I copied this from somewhere. It is a good start, though
# ~/.tmux.conf
#
# See the following files:
#
# /opt/local/share/doc/tmux/t-williams.conf
# /opt/local/share/doc/tmux/screen-keys.conf
# /opt/local/share/doc/tmux/vim-keys.conf
#
# URLs to read:
#
@fundon
fundon / vim_centos.sh
Created August 17, 2011 03:52
install vim 7.3 on centos, debian, arch etc.
#!/bin/bash
# on centos minimal
yum install gcc
yum install make
yum install ncurses-devel
yum install lua lua-devel
yum install ruby ruby-devel
yum install python python-devel
yum install perl perl-devel
@javan
javan / gist:1168475
Created August 24, 2011 16:32
Fix iPhone home button
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/
1.) Open any application
2.) Press and hold the power button until the slide to shutdown swipe bar appears.
3.) Release Power button
4.) Press and hold Home button Lightly
until screen returns to icon screen
@pratikshabhisikar
pratikshabhisikar / gist:1183604
Created August 31, 2011 14:02
Detecting Left and Right scroll in UIScrollView with paging enabled.
typedef enum {
kScrollDirectionLeft = -1,
kScrollDirectionNone,
kScrollDirectionRight
}ScrollDirection;
-(void) scrollEffectInDirection:(ScrollDirection) direction{
ContentView *previousPageView = (ContentView *)[self.pageScrollView viewWithTag:kPreviousPageTag];
ContentView *currentPageView = (ContentView *)[self.pageScrollView viewWithTag:kCurrentPageTag];
ContentView *nextPageView = (ContentView *)[self.pageScrollView viewWithTag:kNextPageTag];
@lucifr
lucifr / gist:1208100
Created September 10, 2011 08:16
Sublime Text 2 - 实用快捷键 (Mac OS X)
@ayanamist
ayanamist / proxy.pac
Created November 24, 2011 06:08
My Pac File for Auto Proxy
var PROXY = {
"direct":"DIRECT",
"gfw":"PROXY 127.0.0.1:8123"
};
var DEFAULT = "direct";
var SECTIONS = [
{
"name":"direct",
@zhasm
zhasm / bash_aliases.sh
Created February 29, 2012 06:11
bash_aliases
#converting utilities
alias b2u='iconv -f big5 -t utf-8'
alias g2u='iconv -f gbk -t utf-8'
alias sec='date "+%s"'
alias now='date "+%Y-%m-%d %H:%M"'
#show image resolution
alias resolution='identify $1 |awk '\''{print $3}'\'''
#count freqency
alias count='sort | uniq -c| sort -nr'
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@ianthekirkland
ianthekirkland / Finder-ApplyColorLabelToSelectedItems.applescript
Created April 17, 2012 07:45
Apply color labels to selected Finder items; Ideal for assigning to hotkeys via a Launcher app such as "Keyboard Maestro", "Butler", or "Alfred".
-- Finder-ApplyColorLabelToSelectedItems
-- ©2011 Ian Kirkland, M.Ed, Kirkland Professional Studios
(*
I like to use Finder labels in conjunction with smart folders that point to files and/or folders of a specific label color. That way, I can use red labels for "urgent" to-do items, orange labels for "standard to-do", etc. This script allows a much quicker way of applying color labels.
LEGEND
-------------------------------------------------
Keystroke | Appearance | Label Index
-------------------------------------------------
key "0" = No color = 0
@bewebste
bewebste / backup_growl.rb
Created May 7, 2012 18:47
Script to display Time Machine progress messages as Growl notifications
#!/usr/bin/ruby
#Just run this script in a terminal window, leaving the window open in the
#background so it can continue to process messages.
IO.popen("syslog -F \'$(Sender): $Message\' -w -k Sender com.apple.backupd") { |syslogIO|
while (inputString = syslogIO.gets) do
escapedString = inputString.gsub("'", "\\'")
`/usr/local/bin/growlnotify -a 'Time Machine' -m '#{escapedString}'`
end
}