Skip to content

Instantly share code, notes, and snippets.

Apoorv Khatreja ApoorvKhatreja

Block or report user

Report or block ApoorvKhatreja

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ApoorvKhatreja
ApoorvKhatreja / gist:3523726
Created Aug 30, 2012
All animations in iOS, ever
View gist:3523726
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:duration];
[UIView setAnimationDelay:delay];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
//Change the property of the view (size, transparency etc) that you want to animate
[UIView commitAnimations];
@ApoorvKhatreja
ApoorvKhatreja / np.scpt
Created Nov 28, 2012
Now Playing script for Textual that works for both online radio streams and music library.
View np.scpt
on textualcmd()
set nowPlaying to "I'm not currently playing anything."
# iTunes
if isRunning("iTunes") then
tell application "iTunes"
if player state is playing then
if current stream title is not missing value then
set nowPlaying to "/me is currently listening to '" & current stream title & "' on " & name of current track & "."
You can’t perform that action at this time.