This file contains hidden or 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 checkout master | |
git branch --merged | grep -v '\*' | xargs git branch -d |
This file contains hidden or 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 | |
# | |
# $U = DB User | |
# $N = DB Name | |
# | |
mysql -u $U -p <<< "CREATE DATABASE $D DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; use $D; source data/$D.sql;" |
This file contains hidden or 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
# MacOS only | |
sudo chmod +a "USERNAME allow delete,write,append,file_inherit,directory_inherit" TARGET |
This file contains hidden or 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
<select name="state"> | |
<option value="AL">Alabama</option> | |
<option value="AK">Alaska</option> | |
<option value="AZ">Arizona</option> | |
<option value="AR">Arkansas</option> | |
<option value="CA">California</option> | |
<option value="CO">Colorado</option> | |
<option value="CT">Connecticut</option> | |
<option value="DE">Delaware</option> | |
<option value="DC">District Of Columbia</option> |
This file contains hidden or 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
# Create a new project | |
mkdir my-project | |
cd my-project | |
git init | |
echo '.DS_Store' >> .gitignore | |
echo '*.sw*' >> .gitignore | |
git add .gitignore && git commit -m 'First!' | |
git branch development | |
# Set up a development remote |
This file contains hidden or 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
<?php | |
/** | |
* Method to handle cart Action - add product | |
* | |
* @param string forward destination | |
* @param url parameters | |
*/ | |
function actionAddProduct($goto, $parameters) { | |
global $messageStack, $db; |
This file contains hidden or 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
/* | |
Variable Grid System. | |
Learn more ~ http://www.spry-soft.com/grids/ | |
Based on 960 Grid System - http://960.gs/ | |
Licensed under GPL and MIT. | |
*/ | |
/* | |
Forces backgrounds to span full width, |
This file contains hidden or 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
<?php | |
Example::app(function ($app) { | |
extract($app->load('request', 'response', 'security', 'error')); | |
$security->authenticated() | |
|| $error->send(302, '/login'); | |
extract($app->load('router')); |
This file contains hidden or 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
<?php | |
header('content-type: text/plain'); | |
if (isset($_GET['s'])) { | |
die(file_get_contents(__FILE__)); | |
} | |
$text = 'Thequickbrownfoxjumpedoverthelazydog'; |
This file contains hidden or 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
RewriteRule ^.*$ http://example.com/ [R=301,L] |