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
# View my Jekyll blog http://paulstamatiou.com and my jekyll migration post http://paulstamatiou.com/how-to-wordpress-to-jekyll/ | |
# | |
# | |
# based on the import script by icebreaker, which is based on mojombo's | |
# https://github.com/mojombo/jekyll/blob/master/lib/jekyll/migrators/wordpress.rb | |
# https://gist.github.com/303570 | |
# edited to rewrite image URLs to use my CloudFront URL | |
require 'rubygems' | |
require 'sequel' |
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
# This should be run on a new Linode Ubuntu 32-bit 10.04 image as root to prepare it for Nginx, PHP, MySQL, Node, CouchDB environment | |
# To start, something like this works: | |
# scp prepare_server.sh root@123.456.789.10:/root | |
# First, install basic linux utilities (compilers, git, libssl) | |
cd /root | |
mkdir /src | |
cd src |
function html5_canvas() { | |
// declear variables | |
var $canvas, $rect, $circle, $triangle, $i, $limit, $width, $height; | |
//create canvas object with div id | |
$canvas = new fabric.Canvas('canvas_1'); | |
// create Circle - note radius |
function html5_canvas() { | |
// declare variables | |
var $canvas, $element, $circle, $rect, $triangle, $x, $limit, $angle, $centerY, $range, $speed; | |
//dom block element wrapper | |
$element = doodle.createDisplay("canvas"); | |
//creates new canvas element wrapper | |
$canvas = $element.createLayer(); | |
// function to create a random number |
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |
#!/bin/bash | |
# Script adb+ | |
# Usage | |
# You can run any command adb provides on all your currently connected devices | |
# ./adb+ <command> is the equivalent of ./adb -s <serial number> <command> | |
# | |
# Examples | |
# ./adb+ version | |
# ./adb+ install apidemo.apk | |
# ./adb+ uninstall com.example.android.apis |
function fizzbuzz(a, b) { | |
for (var i = a; i <= b; i++) { | |
if (i % 3 == 0 && i % 5 == 0) { | |
console.log("Fizzbuzz"); | |
} else if (i % 5 == 0) { | |
console.log("Buzz"); | |
} else if (i % 3 == 0) { | |
console.log("Fizz"); | |
} else { | |
console.log(i); |
function formatSql($sql) { | |
return preg_replace( | |
'/(select|from|(left |right |natural |inner |outer |cross |straight_)*join|where|limit|update |set|insert |values)/i', | |
"\n$1\n ", str_replace("\n", '', $sql) | |
); | |
} |
/* Véi, foca no código | |
.---. | |
/o o\ | |
__(= " =)__ | |
//\'-=-'/\\ | |
) (_ | |
/ `"=-._ | |
/ \ ``"=. |