This is the sequence of steps to follow to create a root gh-pages
branch. It is based on a question at [SO]
cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
angular.module('demo').service('imageService', function ($http, $q, $timeout) { | |
var NUM_LOBES = 3 | |
var lanczos = lanczosGenerator(NUM_LOBES) | |
// resize via lanczos-sinc convolution | |
this.resize = function (img, width, height) { | |
var self = { } | |
self.type = "image/png" | |
self.quality = 1.0 |
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
// Twitter Issue (Can't tweet exclamation mark with v1.1) | |
// https://dev.twitter.com/discussions/12378 | |
// https://github.com/mikeal/request/issues/578 | |
var escape = function(str) { | |
return encodeURIComponent(str).replace(/[!*()']/g, function(character) { | |
return '%' + character.charCodeAt(0).toString(16); | |
}); | |
}; |
module Main where | |
import qualified Data.ByteString as B | |
import qualified Data.ByteString.Lazy as BL | |
import Data.Binary.Strict.Get | |
import qualified Data.Binary.Strict.BitGet as BG | |
import Data.Word | |
import Control.Monad | |
import Control.Applicative | |
import Data.Binary.Put |
/** | |
* Converts a string to a "URL-safe" slug. | |
* Allows for some customization with two optional parameters: | |
* | |
* @param {string} Delimiter used. If not specified, defaults to a dash "-" | |
* @param {array} Adds to the list of non-alphanumeric characters which | |
* will be converted to the delimiter. The default list includes: | |
* ['–', '—', '―', '~', '\\', '/', '|', '+', '\'', '‘', '’', ' '] | |
*/ | |
if (!String.prototype.slugify) { |