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
$BANK_PREFIXES = [1, 2, 31, 33, 34, 36, 37, 38, 39, 4, 5, 6, 8] | |
class String | |
# converts bank account to numeric format | |
def to_account | |
if self.include?('-') | |
return self.sub(/\-(\d)(\d+)$/, "\\1" << '0' * ((14 - self.length)+1) << "\\2").to_i if ['4','5'].include?(self[0..0]) | |
return self.sub('-', '0' * ((14 - self.length) + 1)).to_i | |
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
desc "Watch the site and regenerate when it changes" | |
task :watch do | |
require 'fssm' | |
puts "Watching for Changes " | |
FSSM.monitor(File.join(File.dirname(__FILE__), 'content'), '**/*') do | |
update {|base, relative| rebuild_site(relative)} | |
delete {|base, relative| rebuild_site(relative)} | |
create {|base, relative| rebuild_site(relative)} | |
end | |
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
package | |
{ | |
import flash.events.*; | |
import flash.media.Sound; | |
import flash.media.SoundChannel; | |
import flash.media.SoundTransform; | |
import flash.utils.Timer; | |
import flash.external.ExternalInterface; | |
import flash.net.URLRequest; | |
import flash.display.Sprite; |
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
client = Savon::Client.new do | |
# This can be a URL also | |
wsdl.document = "/Path/to/your.wsdl" | |
# These are optional, only if your WSDL sucks :) | |
wsdl.endpoint = "https://your_endpoint" | |
wsdl.namespace = "http://your_namespace" | |
certs = Akami::WSSE::Certs.new :cert_file => "/path/to/cert.crt", :private_key_file => "/path/to/private/key.pem", :private_key_password => "password" | |
wsse.sign_with = Akami::WSSE::Signature.new certs |
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
/* | |
* L.TileLayer.LocalCache : A tile layer using SQL Storage, if available. | |
*/ | |
L.TileLayer.LocalCache = L.TileLayer.extend({ | |
options: { | |
minZoom: 0, | |
maxZoom: 18, | |
tileSize: 256, | |
subdomains: 'abc', |
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
import base64 | |
from StringIO import StringIO | |
from django.http import HttpResponse | |
from django.utils import simplejson | |
from easydict import EasyDict as edict | |
from landez import TilesManager | |
from . import app_settings |
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
# add these modifications to your path | |
export PATH="$HOME/bin:$PATH" | |
# activate NVM | |
. ~/.nvm/nvm.sh |
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
set :application, "appname" | |
set :deploy_to, "/var/www" | |
set :scm, :git | |
set :repository, "git@github.com:user/app.git" | |
default_run_options[:pty] = true | |
set :user, "www-data" | |
set :domain, "foo.tld" | |
set :normalize_asset_timestamps, false |
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
# It'd be great to get this running via AppleScript and sans Alfred if anyone with more knowledge than me knows how :) | |
### STEP 1 | |
#!/bin/sh | |
# Save this file as /bin/rvm_ruby, and do chmod 755 /bin/rvm_ruby | |
# to give it the proper permissions | |
# From http://www.aeonscope.net/2011/05/29/connecting-alfred-to-bitly-via-ruby/ | |
if [[ -s ~/.rvm/scripts/rvm ]]; then |
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
package io.inbot; | |
import com.github.jsonj.JsonObject; | |
import com.github.jsonj.tools.JsonParser; | |
import java.io.File; | |
import java.io.IOException; | |
import java.nio.charset.Charset; | |
import java.security.InvalidKeyException; |
OlderNewer