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
if [ $(basename $(pwd)) == ".git" ]; then | |
cd .. | |
export GIT_DIR=.git | |
fi | |
git checkout $(git rev-parse master) | |
git reset --hard HEAD -- | |
git submodule update --init --recursive | |
ant |
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 | |
namespace Fuel\Migrations; | |
class Db_Stuff | |
{ | |
public function up() | |
{ | |
// Try/catch so that we can provide a nicer error message and gracefully fall out of the migration |
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
wdiff = diff --color-words --word-diff-regex='[^[:space:]\\(\\)/<>{}\",_-]+' |
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
server { | |
listen 80; | |
server_name example.com; | |
root /path/to/public; | |
location / { | |
try_files $uri /index.php?uri=$uri; | |
} |
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 | |
return array( | |
'always_load' => array( | |
'packages' => array( | |
'log', | |
), |
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
$existing_item = $this->get_item_by_id($new_item->get_product_id()); | |
if ($existing_item && $existing_item->bundle_variants && $new_item->bundle_variants) { | |
$fuck_you_1 = array_keys($existing_item->bundle_variants); | |
$fuck_you_2 = array_keys($new_item->bundle_variants); | |
sort($fuck_you_1); sort($fuck_you_2); | |
if ($fuck_you_1 != $fuck_you_2) { | |
$existing_item = null; | |
} |
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 | |
namespace DataGrid; | |
class DataGrid | |
{ | |
/** | |
* Forge a new DataGrid | |
* | |
* @param string|\Fuel\Core\Database_Query_Builder_Select $table_or_query |
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 | |
class Autoloader extends \Fuel\Core\Autoloader {} | |
class Agent extends \Fuel\Core\Agent {} | |
class Arr extends \Fuel\Core\Arr {} | |
class Asset extends \Fuel\Core\Asset {} | |
class Asset_Instance extends \Fuel\Core\Asset_Instance {} |
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
# Initial screens | |
screen -t eg 0 ssh user@host -t 'cd /file/path;bash' | |
screen -t ssh 9 | |
# Hardstatus... duh | |
hardstatus on | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}%{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%{g}' | |
# Autodetach session on hangup instead of terminating screen completely |
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
SET @id = 3; | |
SET @to = 9; | |
SET @lower = IF(@from < @to, @from, @to); | |
SET @upper = IF(@from < @to, @to, @from); | |
UPDATE `ordering` | |
SET `order` = | |
IF(`id` = @id, |