Skip to content

Instantly share code, notes, and snippets.

View brod-ie's full-sized avatar

Ryan Brodie brod-ie

View GitHub Profile
@thomsbg
thomsbg / compile_templates.js
Last active December 22, 2015 20:29
Loop through all the view prototype objects in a namespace, transforming their templateId into a template function.
var compileTemplates = function() {
_.each(App.Views, function(View) {
if (View.prototype.templateId) {
// The templateId references the id of a DOM element containing
// the content of the template
var html = jQuery('#' + View.prototype.templateId).html() || '';
View.prototype.template = _.template(html);
}
});
}
@funkatron
funkatron / twitter-oauth-pin.html
Created May 19, 2011 01:06
A simple example of PIN-based oauth flow with Twitter and jsOAuth
<!DOCTYPE html>
<html>
<head>
<!--
A simple example of PIN-based oauth flow with Twitter and jsOAuth.
This is mostly based on/copied from <http://log.coffeesounds.com/oauth-and-pin-based-authorization-in-javascri>.
Get jsOAuth at <https://github.com/bytespider/jsOAuth/downloads>
cp -r /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0\ \(15A5278f\) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
@mikaelbr
mikaelbr / gulpfile.js
Last active February 8, 2021 00:32 — forked from Sigmus/gulpfile.js
Gulp + Browserify + Reactify + OS Notification
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var browserify = require('browserify');
var reactify = require('reactify');
var watchify = require('watchify');
var notify = require("gulp-notify");
var scriptsDir = './scripts';
var buildDir = './build';
@douglasduteil
douglasduteil / .travis.yml
Last active February 22, 2021 13:27 — forked from lukewpatterson/gist:4242707
Here is how I allow Git SSH authentication in Travis CI. I'm using it to connect Travis to my repo organization AngularUI. This trick is a fork. The goal is to encode the RSA private deploy key in the .travis.yml as "-secure: xxxxx.....".
---
language: node_js
node_js:
- '0.10'
branches:
only:
- master
before_script: .travis/before_script.sh
script: echo -e " >>> Do something... \"grunt\" for example\n"
after_success: .travis/after_success.sh
@jamesstout
jamesstout / verifyReceipt.php
Last active August 5, 2021 08:49
Verify iOS in-app purchase receipts
<?php
include("/var/www/vhosts/xxxxxcom/httpdocs/PHPUtils/dbConfig.php");
include("/var/www/vhosts/xxxxxcom/httpdocs/PHPUtils/DButils.php");
// verifies receipt from iOS in-app purchase
// returns:
// 0 - if params missing
// 1 - if receipt is valid
// 2 - if invalid receipt, or invalid response from verification server
// or bundle/in-app IDs are incorrect
@ryanjbonnell
ryanjbonnell / gist:4074061
Last active November 26, 2021 13:40
Install PHP APC on Mac OS X 10.8 "Mountain Lion"
# Compile PCRE - Perl Compatible Regular Expressions
cd /usr/local/src
curl -O ftp://ftp.csx.cam.ac.uk//pub/software/programming/pcre/pcre-8.31.tar.gz
tar -xvzf pcre-8.31.tar.gz
cd pcre-8.31
./configure
make
sudo make install
# Compile Autoconf
@chrisjacob
chrisjacob / README.md
Created February 14, 2011 14:31
Setup GitHub Pages "gh-pages" branch as a subfolder within the "master" project on your local checkout - a step-by-step guide.

Intro

Setup GitHub Pages "gh-pages" branch as a subfolder within the "master" project on your local checkout.

IMPORTANT

If you plan on switching between different branches (e.g. git checkout master-experiment then revert back with git checkout master) you will loose your child folder from this tutorial (because it's in your .gitignore and is not part of your master branch).

@rudotriton
rudotriton / scriptable-calendar-widget.md
Last active August 8, 2023 14:35
Customizable iOS Calendar widget in Scriptable

Scriptable Calendar Widget

scriptable calendar

For ease of maintainability this project has moved from this gist to its own repository. You can go and visit it there.