Skip to content

Instantly share code, notes, and snippets.

View hoonto's full-sized avatar

Matt Mullens hoonto

View GitHub Profile
@hoonto
hoonto / ApplicationRouting.h
Last active December 16, 2015 04:59
Titanium Appcelerator issue with auto-generated ApplicationRouting.h. This shows the problem.
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2013 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Do not modify. Your changes *will* be lost.
*/
#import <Foundation/Foundation.h>
@hoonto
hoonto / sequelize.patch
Created June 16, 2013 14:57
Patch for sequelize that allows integration with Postgres-XC
diff -Naur '--exclude-from=../patches/exclude' sequelize_git/lib/dao-factory.js sequelize/lib/dao-factory.js
--- sequelize_git/lib/dao-factory.js 2013-02-21 14:48:41.968230261 +0000
+++ sequelize/lib/dao-factory.js 2013-02-21 16:08:29.181145551 +0000
@@ -61,6 +61,9 @@
if ((attributeName !== 'id') && (dataTypeString.indexOf('PRIMARY KEY') !== -1)) {
self.primaryKeys[attributeName] = dataTypeString
+ } //MLM: pgxc:
+ else if((attributeName == 'id') && (self.options.pgxc == true)){
+ self.primaryKeys[attributeName] = dataTypeString
@hoonto
hoonto / TEMPLATE.js
Created June 16, 2013 15:02
A simple module template, use with sublime text 2 for example
var inherits = require('util').inherits;
var EventEmitter = require('events').EventEmitter;
module.exports = TEMPLATE;
function TEMPLATE (opts) {
EventEmitter.call(this);
var self = this;
if (!(self instanceof TEMPLATE)) return new TEMPLATE(opts); //If you don't use the 'new', I will for you.
@hoonto
hoonto / rebase
Created July 30, 2013 22:49 — forked from mnichols/rebase
git pull origin {tracking branch} # ie 'dev'
git checkout my-feature
git rebase {tracking branch}
#resolve conflicts
git checkout {tracking branch}
git merge my-feature
git push origin {tracking branch}
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@hoonto
hoonto / gist:8940591
Created February 11, 2014 18:10
Pivotal bug search: unscheduled or accepted
type:bug -state:unscheduled,accepted
@hoonto
hoonto / gist:3fb6bc9eb9c70cc0c6df
Created July 9, 2014 19:34
solarized.vim modified for Terminology and spf13
1. Install spf13
2. To enable copy paste:
sudo apt-get install vim-gnome
// and in vimrc.local:
map <C-c> "+y
3. vi .vim/bundle/vim-colors-solarized/colors/solarized.vim
// find the commented lines and either comment them or change them accordingly:
" MLM: CHANGED THIS ONE:
" exe "let s:fmt_revbb = ' ".s:vmode."=NONE".s:r.s:bb. " term=NONE".s:r.s:bb."'"
@hoonto
hoonto / LICENSE.txt
Last active August 29, 2015 14:07 — forked from jed/LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

Keybase proof

I hereby claim:

  • I am hoonto on github.
  • I am hoonto (https://keybase.io/hoonto) on keybase.
  • I have a public key whose fingerprint is D2DB CF66 4DB9 E778 93AC D437 DC54 AAC1 ADF7 126C

To claim this, I am signing this object:

@hoonto
hoonto / gist:c206c639d8e5fcc5a307
Created March 10, 2015 18:46
sql server drop everything
/* Drop all non-system stored procs */
DECLARE @name VARCHAR(128)
DECLARE @SQL VARCHAR(254)
SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [type] = 'P' AND category = 0 ORDER BY [name])
WHILE @name is not null
BEGIN
SELECT @SQL = 'DROP PROCEDURE [dbo].[' + RTRIM(@name) +']'
EXEC (@SQL)
PRINT 'Dropped Procedure: ' + @name