Skip to content

Instantly share code, notes, and snippets.

View jbrennan's full-sized avatar
😅
bestie please let me merge

Jason Brennan jbrennan

😅
bestie please let me merge
View GitHub Profile
# NAME: authinabox
# VERSION: 1.01 (Dec 27, 2008)
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ]
# DESCRIPTION: An "all in one" Sinatra library containing a User model and authentication
# system for both session-based logins OR HTTP Basic auth (for APIs, etc).
# This is an "all in one" system so you will probably need to heavily tailor
# it to your own ideas, but it will work "out of the box" as-is.
# COMPATIBILITY: - Tested on 0.3.2 AND the latest rtomayko Hoboken build! (recommended for the latter though)
# - NEEDS DataMapper!
# - Less work needed if you use initializer library -- http://gist.github.com/40238
"""
Script to convert a Xcode3 Color theme into a Xcode4 one.
Example:
bash# python xcode3_theme_to_xcode4.py Twilight.xcolortheme
It will write a new file: Twilight.dvtcolortheme into the same folder as the script is residing in.
"""
import plistlib,sys
""" Define boilerplate of the color theme """
defaultConfig = {
@lilyball
lilyball / gist:785500
Created January 19, 2011 01:12
.gitignore
# ignore all files in an xcodeproj except for the project itself
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
# unfortunately, this doesn't handle projects in nested dirs. Repeat this pattern as deep as you want
*/*.xcodeproj/*
!*/*.xcodeproj/project.pbxproj
@0xced
0xced / UIDevice+HostUUID.h
Created April 15, 2012 22:26
Alternative iOS device unique identifier
#import <UIKit/UIKit.h>
@interface UIDevice (HostUUID)
- (NSString *) xcd_uniqueIdentifier;
@end
@MicahChalmer
MicahChalmer / .htaccess
Last active May 1, 2016 16:49
Scripts to set up Ruby 1.9.3 on a DreamHost shared hosting account via rbenv and ruby-build, and run a Rack app with it via FastCGI.
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script .fcgi
</IfModule>
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
</IfModule>
Options +FollowSymLinks +ExecCGI
RewriteEngine On
@ccgus
ccgus / gist:4961749
Created February 15, 2013 17:03
replacing NSImage reps
NSImage *iRep = [NSImage imageNamed:[fileName stringByDeletingPathExtension]];
if (iRep) {
NSImage *ni = [[NSImage alloc] initByReferencingFile:output];
for (NSImageRep *r in [[iRep representations] copy]) {
[iRep removeRepresentation:r];
}
@svoisen
svoisen / Of Mice and Men
Created March 21, 2013 19:16
Information on low-level scrolling events on Mac OS X
From the WebKit documentation at:
http://www.opensource.apple.com/source/WebKit/WebKit-7533.16/chromium/src/mac/WebInputEventFactory.mm
// Of Mice and Men
// ---------------
//
// There are three types of scroll data available on a scroll wheel CGEvent.
// Apple's documentation ([1]) is rather vague in their differences, and not
// terribly helpful in deciding which to use. This is what's really going on.
//
@erichurst
erichurst / US Zip Codes from 2013 Government Data
Created December 9, 2013 23:00
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
@kluivers
kluivers / gist:9808519
Created March 27, 2014 14:16
Responder forwarding
@implementation UIResponder (ResponderForwarding)
- (BOOL) tryToPerformAction:(SEL)action withObject:(id)object
@end
@implementation UIResponder (ResponderForwarding)
- (BOOL) tryToPerformAction:(SEL)action withObject:(id)object
{
if (!action) {
return NO;
@phnessu4
phnessu4 / wwdc2014
Last active July 20, 2021 02:25
wwdc 2014 sessions and pdf
pdf
http://devstreaming.apple.com/videos/wwdc/2014/102xxw2o82y78a4/102/102_platforms_state_of_the_union.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/201xx2xfazhzce8/201/201_advanced_topics_in_internationalization.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/202xx3ane09vxdz/202/202_whats_new_in_cocoa_touch.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/203xxh9oqtm0piw/203/203_introducing_healthkit.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/204xxhe1lli87dm/204/204_whats_new_in_cocoa.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/205xxqzduadzo14/205/205_creating_extensions_for_ios_and_os_x,_part_1.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/206xxdiurnffagr/206/206_introducing_the_modern_webkit_api.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/207xx270npvffao/207/207_accessibility_on_os_x.pdf?dl=1