git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
## ffmpeg encoding for Twilio, Genesys and other voice delivery platforms | |
## File input can be any format ffmpeg accepts (.mp3, .wav, .avi, etc.), output shout should be .wav format | |
ffmpeg -i "YOUR_INPUT_FILE.m4a" -ar 8000 -ac 1 -ab 64 -acodec pcm_mulaw "YOUR_OUTPUT_FILE.wav" -map 0:0 |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
Setup a local CocoaPods directory, and register it with CocoaPods
mkdir -p ~/CocoaPods/Local
(cd ~/CocoaPods/Local; git init)
pod repo add ~/CocoaPods/Local
This playbook has been removed as it is now very outdated. |
#!/usr/bin/ruby | |
=begin | |
Usage: rtftomarkdown.rb FILENAME.rtf | |
Uses textutil, available on Mac only (installed by default) | |
Outputs to STDOUT | |
Notes: | |
Links are replaced with Markdown references (duplicate links combined). |
import binascii | |
import StringIO | |
class PKCS7Encoder(object): | |
def __init__(self, k=16): | |
self.k = k | |
## @param text The padded text for which the padding is to be removed. | |
# @exception ValueError Raised when the input padding is missing or corrupt. | |
def decode(self, text): |
import requests | |
#http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file | |
url = "http://localhost:5000/" | |
fin = open('simple_table.pdf', 'rb') | |
files = {'file': fin} | |
try: | |
r = requests.post(url, files=files) | |
print r.text |
import struct | |
from binascii import b2a_base64 as e64 | |
from binascii import a2b_base64 as d64 | |
import scrypt | |
import Crypto.Random | |
random = Crypto.Random.new().read | |
from passlib.utils import consteq | |
_PARAMS = struct.Struct("!BBBB") |
#import <CommonCrypto/CommonDigest.h> | |
#import <CommonCrypto/CommonHMAC.h> | |
+ (NSString*)hmacsha1Hexdigest:(NSString*)data key:(NSString*)key | |
{ | |
const char *cKey = [key cStringUsingEncoding:NSUTF8StringEncoding]; | |
const char *cData = [data cStringUsingEncoding:NSUTF8StringEncoding]; | |
uint8_t digest[CC_SHA1_DIGEST_LENGTH] = {0}; | |
CCHmac(kCCHmacAlgSHA1, cKey, strlen(cKey), cData, strlen(cData), digest); |