If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
| <?php | |
| function require_auth() { | |
| $AUTH_USER = 'admin'; | |
| $AUTH_PASS = 'admin'; | |
| header('Cache-Control: no-cache, must-revalidate, max-age=0'); | |
| $has_supplied_credentials = !(empty($_SERVER['PHP_AUTH_USER']) && empty($_SERVER['PHP_AUTH_PW'])); | |
| $is_not_authenticated = ( | |
| !$has_supplied_credentials || | |
| $_SERVER['PHP_AUTH_USER'] != $AUTH_USER || | |
| $_SERVER['PHP_AUTH_PW'] != $AUTH_PASS | 
| # Usage: | |
| # 1. Drop this file into lib/capistrano/submodule_strategy.rb | |
| # 2. Add the following to your Capfile: | |
| # require 'capistrano/git' | |
| # require './lib/capistrano/submodule_strategy' | |
| # 3. Add the following to your config/deploy.rb | |
| # set :git_strategy, SubmoduleStrategy | |
| module SubmoduleStrategy | |
| # do all the things a normal capistrano git session would do | 
| #!/bin/bash | |
| function jsonval { | |
| temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop` | |
| echo ${temp##*|} | |
| } | |
| json=`curl -s -X GET http://twitter.com/users/show/$1.json` | |
| prop='profile_image_url' | |
| picurl=`jsonval` | 
| <?php | |
| /** | |
| * ----------------------------------------------------------------------------------------- | |
| * Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
| * ----------------------------------------------------------------------------------------- | |
| */ | |
| // HTML Minifier | |
| function minify_html($input) { | 
| <?php | |
| /* | |
| * Mysql database class - only one connection alowed | |
| */ | |
| class Database { | |
| private $_connection; | |
| private static $_instance; //The single instance | |
| private $_host = "HOSTt"; | |
| private $_username = "USERNAME"; | |
| private $_password = "PASSWORd"; | 
If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
| #!/bin/sh | |
| if [ $# -ne 1 ]; then | |
| echo "$0 <git-commit>" 1>&2 | |
| exit 1 | |
| fi | |
| git diff --name-status $1 | |
| read -p "Press any key to execute..." | 
Install Cygwin (http://www.cygwin.com/)
Download the RubyGems tarball from Ruby Forge (http://rubyforge.org/projects/rubygems/)
In a bash terminal, navigate to the unpacked directory and run:
| #!/bin/bash | |
| # author: Jean-François Lépine | |
| # Ruby | |
| # ----------------------- | |
| curl -L get.rvm.io | bash -s stable | |
| source /etc/profile.d/rvm.sh | |
| rvm reload | |
| rvm install 2.1.0 | 
| <?php | |
| /** | |
| * UUID class | |
| * | |
| * The following class generates VALID RFC 4122 COMPLIANT | |
| * Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
| * | |
| * UUIDs generated validates using OSSP UUID Tool, and output | |
| * for named-based UUIDs are exactly the same. This is a pure | |
| * PHP implementation. |