Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
| import re | |
| # http://atomboy.isa-geek.com/plone/Members/acoil/programing/double-metaphone | |
| from metaphone import dm as double_metaphone | |
| # get the Redis connection | |
| from jellybean.core import redis | |
| import models | |
| # Words which should not be indexed |
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
| /* | |
| Node.js, express, oauth example using Twitters API | |
| Install Node.js: | |
| curl -0 http://nodejs.org/dist/v0.6.11/node-v0.6.11.tar.gz | |
| tar -zxf node-v0.6.11.tar.gz | |
| cd node-v0.6.11 | |
| ./configure | |
| make | |
| make install |
| <!doctype html> | |
| <!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
| <html> | |
| <head> | |
| <title>iOS 8 web app</title> | |
| <!-- CONFIGURATION --> |
| users = require './../data/users' | |
| data = users: [] | |
| data.users.anon = authenticated: false | |
| data.users.admin = users[0] | |
| data.users.jk = users[1] | |
| data.users.artle = users[5] | |
| data.users.beountain = users[4] | |
| setSession = (userKey) -> |
| Secure sessions are easy, but not very well documented. | |
| Here's a recipe for secure sessions in Node.js when NginX is used as an SSL proxy: | |
| The desired configuration for using NginX as an SSL proxy is to offload SSL processing | |
| and to put a hardened web server in front of your Node.js application, like: | |
| [NODE.JS APP] <- HTTP -> [NginX] <- HTTPS -> [PUBLIC INTERNET] <-> [CLIENT] | |
| Edit for express 4.X and >: Express no longer uses Connect as its middleware framework, it implements its own now. |
##Chai Expect
##Language Chains
| module.exports = { | |
| 'HOSTPATH': 'http://your.host.here', | |
| 'PORT': 80, | |
| 'EXPRESS_SESSION_SECRET': '123456', | |
| 'TWITTER_CONSUMER_KEY': 'your-consumer-key-here', | |
| 'TWITTER_CONSUMER_SECRET': 'your-secret-here', | |
| 'GOOGLE_APP_ID': 'your-app-id-here', | |
| 'GOOGLE_CONSUMER_SECRET': 'your-consumer-secret-here', | |
| }; |
| var rework = require('rework'); | |
| var stdin = require('stdin'); | |
| var gm = require('gm'); | |
| stdin(function(str){ | |
| rework(str) | |
| .use(rework.at2x()) | |
| .use(rework.url(retina)) | |
| .toString(); |