Skip to content

Instantly share code, notes, and snippets.

Erica Sadun erica

Block or report user

Report or block erica

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
View gist:22207
#include <stdio.h>
#include <stdlib.h>
main()
{
int *foo;
foo = (int *)malloc(sizeof(int)*4);
foo[0] = 27;
int *bar = foo + 1;
*bar = 59;
printf("%d\n", foo[0]);
View gist:22229
HAI
CAN HAS STDIO?
I HAS A VAR
IM IN YR LOOP
UP VAR!!1
VISIBLE VAR
IZ VAR BIGGER THAN 10? KTHXBYE
IM OUTTA YR LOOP
KTHXBYE
View gist:22911
SBWidgetTag
WidgetDisplayName
WidgetDisplayName
WidgetDisplayName
DELETE_WIDGET_TITLE
DELETE_WIDGET_BODY
DELETE_WIDGET_CONFIRM
DELETE_WIDGET_CANCEL
View gist:22912
isWidgetApplication
SBWidgetTag
widgetRoles
WidgetDisplayName
SBWidgetApplicationIcon
DELETE_WIDGET_TITLE
DELETE_WIDGET_BODY
DELETE_WIDGET_CONFIRM
DELETE_WIDGET_CANCEL
View Remote access to AirFlick
REMOTE REQUESTS:
com.sadun.airflick
RequestType := show-photo | play-media | screenshot
MediaLocation :=
<url string> | <local file path string> | <array of local file path strings for slideshow>
Rotation := 0 | 1 | 2 | 3 (0 ^, 1 <, 2 v, 3 >)
Transition := SlideRight | Dissolve
SlideDuration := 2 | 3 | 5 | 8 | 10 (Use strings. Incorrect durations default to 5)
// Single Slide
@erica
erica / gist:1130696
Created Aug 7, 2011
GrabUpper basics
View gist:1130696
I wrote GrabUpper many moons ago as a favor for a friend when GrabUp died. GrabUpper lets you automatically upload screenshots to Dropbox or TwitPic.
ADDING CREDENTIALS
Open the settings drawer (lower-right button). Enter your TwitPic (Twitter) credentials and/or add your Dropbox User ID. To retrieve this, visit Dropbox.com and right-click any item in your Public folder. Choose Copy Public Link. Your user id is between "/u/" and the file name, e.g.
http://dl.dropbox.com/u/THIS-IS-YOUR-ID/jobs-unicorn1.jpg
USING GRABUPPER
ScreenShots: Choose where you want screenshots sent to. With the screen shot service running (butterfly button), take a screenshot. If you select DropBox as the destination, it must be running on your computer for this to work.
View gist:5224282
#define kClarusImageWidth 41
#define kClarusImageHeight 32
Byte moof[kClarusImageHeight][kClarusImageWidth] = {
{0,0,0,0,0,0,1,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,1,0,0,1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1},
{0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1},
{0,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1},
{0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1},
View gist:5775244
2013-06-13 10:35:26.246 HelloWorld[26278:c07] [Helvetica Neue] HelveticaNeue-Light {NSCTFontProportionTrait = 0; NSCTFontSlantTrait = 0; NSCTFontSymbolicTrait = 0; NSCTFontWeightTrait = "-0.4";}, 14.000000
0 6 "Lorem "
NSFont: <UICTFont: 0xa265e60> font-family: "HelveticaNeue-Medium"; font-weight: bold; font-style: normal; font-size: 20px
NSColor: UIDeviceRGBColorSpace 0 0 1 1
6 6 "ipsum "
NSFont: <UICTFont: 0xed3f330> font-family: "HelveticaNeue-Light"; font-weight: normal; font-style: normal; font-size: 14px
NSColor: UIDeviceRGBColorSpace 1 0 0 1
View gist:5775391
NSMutableAttributedString *s = [NSMutableAttributedString string];
NSMutableAttributedString *word = [NSMutableAttributedString stringWithString:@"Lorem "];
word.font = [UIFont headline1];
[s appendAttributedString:word];
word = [NSMutableAttributedString stringWithString:@"ipsum "];
word.color = [UIColor redColor];
word.font = [UIFont body].italic;
[s appendAttributedString:word];
You can’t perform that action at this time.