Skip to content

Instantly share code, notes, and snippets.

View soffes's full-sized avatar

Sam Soffes soffes

View GitHub Profile
# .gitignore I use in Xcode projects
.DS_Store
*.mode1v3
*.pbxuser
build
- (void)enableEmoji {
NSString *filePath = @"/private/var/mobile/Library/Preferences/com.apple.Preferences.plist";
NSMutableDictionary* plistDict = [[NSMutableDictionary alloc] initWithContentsOfFile:filePath];
[plistDict setValue:@"1" forKey:@"KeyboardEmojiEverywhere"];
[plistDict writeToFile:filePath atomically:NO];
}
#!/opt/local/bin/python2.6
# This script fixes multiple spaces (that Git has a problem with) quickly.
# I know this sucks. It is a quick solution.
# Please fork this, fix it, and email me at sam@samsoff.es
import string
import glob
import sys
import os
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by git-commit with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, make this file executable.
# This is slightly modified from Andrew Morton's Perfect Patch.
@soffes
soffes / gist:67133
Created February 19, 2009 21:33 — forked from kmorey/gist:67120
#!/bin/bash
while [ 1 ]
do
if [ ! -e $1 ]
then
echo "Created"
echo $2 > $1
fi
n=$RANDOM
let "n = (n % 1) + 5"

Created by Steven Degutis

www.degutis.org

How To Use

  1. Add PhotoTaker.Framework to your Cocoa project by dragging it into your Frameworks group, adding a Copy Files build phase to your Target, and dragging the Framework from the group to that Copy Files phase.
  2. Create an instance of SDPhotoTakerSheetController
  3. Create an object that conforms to SDPhotoSheetDelegate. It must contain one and only one method - (void) capturePhotoSheetController:(SDPhotoTakerSheetController*)sheetController didAcceptPhoto:(NSImage*)image
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
("Apple") in consideration of your agreement to the following terms, and your
use, installation, modification or redistribution of this Apple software
constitutes acceptance of these terms. If you do not agree with these terms,
please do not use, install, modify or redistribute this Apple software.
In consideration of your agreement to abide by the following terms, and subject
to these terms, Apple grants you a personal, non-exclusive license, under
Apple's copyrights in this original Apple software (the "Apple Software"), to
use, reproduce, modify and redistribute the Apple Software, with or without
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var list = $('ul#books');
$.ajax({
url: 'http://api.new.youversion.com/1.0/bible/books.json',
<?php
// See: http://docs.kohanaphp.com/core/kohana
$lang = ((cookie::get('lang')) ? cookie::get('lang') : Kohana::config('locale.language'));
Kohana::config_set('locale.language', $lang); // Set the system language
setlocale(LC_TIME, $lang);
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="verify-v1" content="lgZ2Xo3tRoNi1D3xewd0mHIF+E+cFoEqeb1IQm47/FA=" />
<title>{Title}{block:PostTitle} - {PostTitle}{/block:PostTitle}</title>
<link rel="icon" href="{Favicon}"/>
<link rel="apple-touch-icon" href="http://assets.samsoffes.com/apple-touch-icon.png"/>
<link rel="alternate" type="application/rss+xml" title="RSS" href="{RSS}"/>
<meta name="viewport" content="width=960"/>