This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git init | |
git submodule add git://github.com/kohana/core.git system | |
git submodule add git://github.com/kohana/database.git modules/database | |
git submodule add git://github.com/kohana/userguide.git modules/userguide | |
git submodule add git://github.com/kohana/image.git modules/image | |
git submodule add git://github.com/kohana/codebench.git modules/codebench | |
git submodule add git://github.com/kohana/auth.git modules/auth | |
git submodule add git://github.com/kohana/pagination.git modules/pagination | |
git submodule add git://github.com/kohana/orm.git modules/orm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (window, document, $, undefined) { | |
if (!$.Deferred) throw 'jQuery 1.5 is required to use the jQuery.oauth script!'; | |
function require(name, url) { | |
if (window[name] === undefined) | |
return $.ajax({ type: 'GET', cache: true, dataType: 'script', url: url }); | |
} | |
$.oauth = function (options) { | |
var d = $.Deferred(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// * iOS zooms on form element focus. This script prevents that behavior. | |
// * <meta name="viewport" content="width=device-width,initial-scale=1"> | |
// If you dynamically add a maximum-scale where no default exists, | |
// the value persists on the page even after removed from viewport.content. | |
// So if no maximum-scale is set, adds maximum-scale=10 on blur. | |
// If maximum-scale is set, reuses that original value. | |
// * <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=2.0,maximum-scale=1.0"> | |
// second maximum-scale declaration will take precedence. | |
// * Will respect original maximum-scale, if set. | |
// * Works with int or float scale values. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof (AC) === "undefined") { | |
AC = {} | |
} | |
AC.ImageReplacer = Class.create({ | |
_defaultOptions: { | |
listenToSwapView: true, | |
filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i, | |
filenameInsert: "_☃x", | |
ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i, | |
attribute: "data-hires", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof (AC) === "undefined") { | |
AC = {} | |
} | |
AC.Detector = { | |
getAgent: function () { | |
return navigator.userAgent.toLowerCase() | |
}, | |
isMac: function (c) { | |
var d = c || this.getAgent(); | |
return !!d.match(/mac/i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." | |
exit | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
// ${1} Resource | |
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index')); | |
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show')); | |
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new')); | |
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit')); | |
Route::post('${1}s', '${1}s@create'); | |
Route::put('${1}s/(:any)', '${1}s@update'); | |
Route::delete('${1}s/(:any)', '${1}s@destroy'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps -u $USER -o rss,command | grep -v peruser | grep -v 'ps -u' | awk '{sum+=$1} END {print sum/1024}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# laravel new-app | |
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git" | |
alias artisan="php artisan" | |
alias migrate="php artisan migrate" | |
alias serve="php artisan serve" | |
alias dump="php artisan dump" | |
alias t="phpunit" | |
# Generators Package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Brightness math based on: | |
// http://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx | |
$red-magic-number: 241; | |
$green-magic-number: 691; | |
$blue-magic-number: 68; | |
$brightness-divisor: $red-magic-number + $green-magic-number + $blue-magic-number; | |
@function brightness($color) { | |
// Extract color components |
OlderNewer