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
# vi: set ft=ruby : | |
# Fail if Vagrant version is too old | |
begin | |
Vagrant.require_version ">= 1.6.0" | |
rescue NoMethodError | |
$stderr.puts "This Vagrantfile requires Vagrant version >= 1.6.0" | |
exit 1 | |
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
MAC_SDK_DIR="/Applications/Android Studio.app/sdk" | |
LINUX_SDK_DIR="~/opt/android-sdk" | |
if [ -d "$MAC_SDK_DIR" ]; then | |
ANDROID_SDK=$MAC_SDK_DIR | |
fi | |
# Setup Android SDK Env | |
if [ -n "$ANDROID_SDK" ]; then | |
echo "Load Android SDK at $MAC_SDK_DIR" |
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
namespace :apns do | |
task :verify do | |
openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert server_certificates_bundle_sandbox.pem -key server_certificates_bundle_sandbox.pem | |
end | |
task :p12topem do | |
openssl pkcs12 -in apns.p12 -out apns.pem -nodes -clcerts | |
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
#!/usr/bin/ruby | |
# Download from https://gist.github.com/cybertk/ff72d68e592966b11c23#file-unzip-rb | |
require 'optparse' | |
require 'zip' | |
require 'rchardet' | |
def GuessEncoding(zipfile_name) | |
enc = {} |
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
#!/usr/bin/env python | |
import optparse | |
import sys | |
import re | |
class WrongNumberOfArgumentsException(Exception): | |
pass | |
def log(msg): |
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
#!/usr/bin/ruby | |
require 'optparse' | |
def RemoveHerokuAppsWithPattern(pattern, confirm) | |
apps = [] | |
# Find apps to remove | |
`heroku apps`.lines do |line| | |
_, app = line.match(/(#{pattern}.*)/).to_a |
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
#!/usr/bin/env python | |
from twilio.rest import TwilioRestClient | |
# Your Account Sid and Auth Token from twilio.com/user/account | |
account_sid = | |
auth_token = | |
client = TwilioRestClient(account_sid, auth_token) | |
message = client.sms.messages.create(body="Jenny please?! I love you <3", |
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
#!/usr/bin/env python | |
import os | |
import sys | |
TEXT_ID = 'itunesartwork' | |
# Provided by sw-dev.herokuapp.com | |
os.environ.setdefault('CLOUDINARY_URL', | |
'cloudinary://api_key:secret') |
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
#!/usr/bin/env python | |
import sys | |
import optparse | |
import numpy as np | |
from progress.counter import Counter | |
def GenerateSamples(mu, sigma, size, delta): | |
bar = Counter('Calculating: ') |
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
#!/usr/bin/env python | |
# | |
# A simple wrapper support select app by reading from environment vars and | |
# auto append the --app to origin heroku bin. | |
# | |
# Last-updated: Fri Dec 6 17:19:07 CST 2013 by quanlong. | |
import sys | |
import os | |
import subprocess |