Skip to content

Instantly share code, notes, and snippets.

@RSully
RSully / challenge1.py
Created February 10, 2012 23:07
Challenged from apply.embed.ly
def nBang(n):
mul = 1
for i in xrange(1,n+1):
mul *= i
return mul
def R(n):
bang = str(nBang(n))
sum = 0
for i in xrange(0, len(bang)):
@RSully
RSully / .bashrc
Created October 30, 2011 19:46
My basherc file
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
export EDITOR='mate'
export GIT_EDITOR='mate -wl1'
## Aliases
# alias ls="ls --color=always"
alias ls="ls -G"
alias ll="ls -l -h"
@RSully
RSully / README
Created June 17, 2011 16:02
Easy to use UIAlertView subclass to get text input
Usage:
-(void)doStuff:(id)sender {
NSString *text = [RSAlertViewTextInput textWithTitle:@"Enter your zipcode" cancelBtn:@"Cancel" submitBtn:@"Submit"];
NSLog(@"nom: %@", text);
}
Easy to use, one line of code. Or you can initialize it and figure it out that way.