Skip to content

Instantly share code, notes, and snippets.

View rayray's full-sized avatar

Raymond Edwards rayray

  • Toronto, ON
View GitHub Profile
@Swizec
Swizec / HNApi.js
Created August 3, 2017 15:49
Unofficial HackerNews write API wrapper
import cheerio from 'cheerio-without-node-native';
const convertRequestBodyToFormUrlEncoded = (data) => {
const bodyKeys = Object.keys(data);
const str = [];
for (let i = 0; i < bodyKeys.length; i += 1) {
const thisKey = bodyKeys[i];
const thisValue = data[thisKey];
str.push(`${encodeURIComponent(thisKey)}=${encodeURIComponent(thisValue)}`);
@xslim
xslim / UIImage+QRCode.m
Created July 22, 2014 07:41
UIImage category for generating QR code
#import "UIImage+QRCode.h"
#import <CoreImage/CoreImage.h>
@implementation UIImage (QRCode)
+ (instancetype)imageWithQRCode:(NSString *)code
{
if (code.length == 0) return nil;
NSData *data = [code dataUsingEncoding:NSUTF8StringEncoding];
@xslim
xslim / gist:1016752
Created June 9, 2011 13:44
Xcode Continuous integration build script
#!/bin/bash
SDK='iphoneos'
CONFIGURATION='Release'
IDENTITY="iPhone Developer"
GIT_BINARY='git'
REMOTE_HOST='http://hal.ciklum.net'
#http://github.com/baz/ios-build-scripts/raw/master/generate_manifest.py
MANIFEST_SCRIPT='/usr/local/bin/generate_manifest.py'
WEB_DIR="/Users/$USER/web"
@mxcl
mxcl / flac2mp3.md
Created June 5, 2009 11:28
Simplest functional FLAC to MP3 converter script you can make