Skip to content

Instantly share code, notes, and snippets.

View charliefulton's full-sized avatar

Charlie Fulton charliefulton

View GitHub Profile
@sptramer
sptramer / gist:11198280
Last active August 29, 2015 14:00
Configuring ODBC connections on OS X

CONFIGURING THE DATABASE CONNECTION

(Note: If you want to just skip to the good parts, use this nice document for configuring unixodbc and freetds only: How to Install FreeTDS and UnixODBC on OS X)

This totally sucks, because the MSSQL database connection tools on OS X don't exist. You're going to need to do the following:

brew install unixodbc

brew install freetds --with-unixodbc

@cwagdev
cwagdev / gist:7759777
Last active December 30, 2015 01:59
iOS Version Macros
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
@taxilian
taxilian / gist:1028036
Created June 15, 2011 20:32
modified jenkins launch plist
We couldn’t find that file to show.
@xjamundx
xjamundx / express-pagination.js
Created April 19, 2011 05:28
sample pagination using express route-specific middleware
// articles per page
var limit = 10;
// pagination middleware function sets some
// local view variables that any view can use
function pagination(req, res, next) {
var page = parseInt(req.params.page) || 1,
num = page * limit;
db.articles.count(function(err, total) {
res.local("total", total);
@tibo
tibo / org.jenkins-ci.jenkins.plist
Created February 7, 2011 01:37
Jenkins Launchd configuration
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UserName</key>
<string>jenkins</string>
<key>Label</key>
<string>org.jenkins-ci.jenkins</string>
<key>EnvironmentVariables</key>
<dict>
CONFIGURATIONS="Distribution Release"
ProvisionRelease=9807906A-42AF-425E-BD50-80D92E523997.mobileprovision
ProvisionDistribution=9EB28E74-33F5-4DDA-9E10-A4C9CC7F5294.mobileprovision
#!/bin/sh
function failed()
{
echo "Failed: $@" >&2
exit 1
}
set -ex
export OUTPUT=$WORKSPACE/output