This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is to rebuild the dist env automatically so that you don't have to | |
# rerun ant deploy all the time | |
# | |
# To run, install watchr gem | |
# | |
# gem install watchr | |
# | |
# Then simply run | |
# | |
# watchr autobuild.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install with: | |
# bash < <(curl -L https://raw.github.com/gist/1754122) | |
# | |
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug | |
# | |
# Update to work with the falcon patch. | |
echo "Installing ruby-debug with ruby-1.9.3-p0 ..." | |
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Viewpoint::EWS::EWS.endpoint = 'https://webmail.sherweb2010.com/EWS/Exchange.asmx' | |
class << self | |
# Authenticate against @Wordnik.com Email account | |
# Viewpoint::EWS::EWS.set_auth('DOMAIN\alex_wordnik.com','password') | |
def authenticate(user, password) | |
user = user.downcase.strip | |
exchange_user = "DOMAIN\\#{user}_wordnik.com" | |
Rails.logger.debug "Authenticate for Exchange User #{exchange_user}" | |
Viewpoint::EWS::EWS.set_auth exchange_user, password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
if(typeof(console) == 'undefined') { | |
(function() { | |
/* Shim for window.console */ | |
var methods = ['log', 'info', 'warn', 'error']; | |
window.console = {}; | |
for(var i = 0; i < methods.length; i++){ | |
window.console[ methods[i] ] = function() {}; | |
} | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Removes trailing whitespace and replaces tabs with two spaces" | |
task :whitespace do | |
sh %[find . \\( -name '*.rb' -or -name '*.yml' \\) -type f -exec ruby -pi -e 'gsub(/ +$/, "");gsub(/\t/, " ")' {} \\;] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cachedFiles = {}; | |
/* load a file and cache it so next time we don't have to re-evaluate again */ | |
function load(path) { | |
if(!cachedFiles[path] || DEBUG ){ | |
log('caching ' + path ); | |
cachedFiles[path] = require(path); | |
}; | |
return cachedFiles[path]; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Celltrust | |
class Sms < Struct.new( :number, :message, :sms_id, :status ) | |
@@count = 0 | |
URL = 'https://www.primemessage.net/TxTNotify/SecureSMS' | |
def self.count | |
@@count | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TinyORM = (function(options) { | |
/* a hash containing all the available models */ | |
var Models = {}; | |
var connection = null; | |
var config = _.extend({ | |
/* The name of the database which Ti will open. The local db is located at: | |
~/Library/Application Support/iPhone Simulator/4.2/Applications/APP_ID/Library/Application Support/database/dbname | |
*/ | |
dbname: 'add.db', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function log(object) { | |
Ti.API.debug(object); | |
if(logger) { | |
logger.log(object); | |
}; | |
}; | |
var indWin = null; | |
var actInd = null; |