Skip to content

Instantly share code, notes, and snippets.

View sptramer's full-sized avatar
🦄
💤

Stephen Tramer sptramer

🦄
💤
View GitHub Profile
@sptramer
sptramer / grmustache.diff
Created July 17, 2014 22:07
diff between appledoc/GRMustache v1.1.3 and GRMustache v1.1.3
diff GRMustache/GRBoolean.m /Users/stramer/src/GRMustache/Classes/GRBoolean.m
53c53
< - (oneway void)release {
---
> - (void)release {
102c102
< - (oneway void)release {
---
> - (void)release {
diff GRMustache/GRMustacheBundleTemplateLoader.m /Users/stramer/src/GRMustache/Classes/GRMustacheBundleTemplateLoader.m
@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

@sptramer
sptramer / gist:11198058
Created April 22, 2014 23:38
pyodbc setup.py quick patch
--- setup.py 2014-04-22 16:32:29.000000000 -0700
+++ setup.py 2014-04-22 16:35:07.000000000 -0700
@@ -145,16 +145,13 @@
elif sys.platform == 'darwin':
# OS/X now ships with iODBC.
- settings['libraries'].append('iodbc')
+ settings['libraries'].append('odbc')
# Apple has decided they won't maintain the iODBC system in OS/X and has added deprecation warnings in 10.8.
@sptramer
sptramer / ipc.js
Created May 3, 2012 05:15
CLI ipc support
/*
* Uses child_process (stable: 3)
*/
var child_process = require('child_process');
var console = require('console');
/*
* NOTE: Because node is naturally asynchronous, this is inappropriate.
* We require blocking on execs, which means that we need to use an
@sptramer
sptramer / log.js
Created May 2, 2012 22:59
CLI logger support
/*
* NOTE: No packages for log, logger, log4j, etc. listed in NPM.
* Assuming no log4j-style support for node exists.
*
* NOTE: Not quite true. node-log4j is a project (1m old, "compatible with node 0.4")
* https://github.com/nomiddlename/log4js-node
*
* This might be suitable but because of the lack of a package or regular maintenance
* we may have difficulty maintaining it.
*
@sptramer
sptramer / hello.txt
Created May 2, 2012 01:09
CLI zip support
Hey there!
@sptramer
sptramer / build.py.patch
Created January 10, 2012 01:18
Diff for titanium module builder.py to build with 1.8.1 and later SDKs. Apply with `patch -p4`
diff --git support/module/iphone/templates/build.py support/module/iphone/templates/build.py
index 7c5ac11..e1a1e04 100755
--- support/module/iphone/templates/build.py
+++ support/module/iphone/templates/build.py
@@ -7,6 +7,11 @@ import os, sys, glob, string
import zipfile
from datetime import date
+try:
+ import json
// ---- app.js ----
Titanium.include('foo/bar.js');
Ti.API.info('X is :'+x);
// ---- foo/bar.js ----
Titanium.include('baz.js');
// ---- foo/baz.js ----