Skip to content

Instantly share code, notes, and snippets.

0xced / UIDevice+HostUUID.h
Created Apr 15, 2012
Alternative iOS device unique identifier
View UIDevice+HostUUID.h
#import <UIKit/UIKit.h>
@interface UIDevice (HostUUID)
- (NSString *) xcd_uniqueIdentifier;
forresto / dynamicland-vneck-tshirt.lua
Last active Aug 30, 2018
first shot at dynamicland #softfab
View dynamicland-vneck-tshirt.lua
-- Shirt (#softfab)
Claim (you) has state "waist" with initial value (30).
Claim (you) has state "arm" with initial value (5).
Claim (you) has state "armaround" with initial value (10).
Claim (you) has state "side" with initial value (20).
Claim (you) has state "neck" with initial value (15).
When (you) contains dots /dots/,
(you) has width /width/:
View swift-self-build
# Faster toolchain build: skips as much as possible.
# To use this toolchain from the command line:"
# export TOOLCHAINS=$(whoami)
# we build to the same prefix every time (instead of building
# to a versioned prefix) because every time the prefix changes
# *everything* rebuilds.
View ArchiveCurrent.applescript
tell application "Notes"
move front note to folder "Archive"
end tell
doersino /
Last active Oct 28, 2017
Simple way of backing up one or multiple Tumblr blogs to date-prefixed folders; downloads and removes required software (except Python) automatically.
# BLOGS is a space-separated list of the blogs you want to backup. You can omit
# the "" part if you want.
# OUT is the directory where the backups will be stored. For each blog, a date-
# prefixed subdirectory will be created here.
trouttdev /
Last active Nov 16, 2016
How to add CC and BCC fields to SparkPost API

How to send a SparkPost email via API with a CC and BCC

Originally I found this which only vaguely pointed me in the right direction, so I thought I'd create a gist of what ended up working for me.


To add a CC address, you have to two two things

  1. Add the address to your recipeints array, and set the header_to value to an address in the to field. So if you're sending the email to and CCing it to, the header_to for will need to be set to
  2. Add the email to the CC headers option in content object. If you have multiple emails, these should be comma separated.
MicahChalmer / .htaccess
Last active May 1, 2016
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.
View .htaccess
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script .fcgi
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
Options +FollowSymLinks +ExecCGI
RewriteEngine On
ccgus / gist:4961749
Created Feb 15, 2013
replacing NSImage reps
View gist:4961749
NSImage *iRep = [NSImage imageNamed:[fileName stringByDeletingPathExtension]];
if (iRep) {
NSImage *ni = [[NSImage alloc] initByReferencingFile:output];
for (NSImageRep *r in [[iRep representations] copy]) {
[iRep removeRepresentation:r];
View gist:785500
# ignore all files in an xcodeproj except for the project itself
# unfortunately, this doesn't handle projects in nested dirs. Repeat this pattern as deep as you want
Script to convert a Xcode3 Color theme into a Xcode4 one.
bash# python 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 = {