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
export TERM=xterm-256color | |
DEFAULT=$"\e[38;5;247m" | |
PINK=$"\e[38;5;163m" | |
GREEN=$"\e[38;5;76m" | |
ORANGE=$"\e[38;5;208m" | |
RED=$"\e[38;5;160m" | |
BLUE=$"\e[38;5;26m" | |
parse_git_branch() { |
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
RewriteBase / | |
RewriteCond %{HTTP_HOST} !oldexample.com$ [NC] | |
RewriteRule ^(.*)$ http://newexample.com/$1 [L,R=301] |
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
mysqldump -u username -h localhost --skip-triggers --compact --no-create-info database_name > database_dump_name.sql -p |
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
mysqldump -u username -h localhost --no-data -p database_name > database_dump_name.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
RewriteRule ^this/that\.html$ http://www.something.com/that/ [R=301,L] |
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 | |
/** | |
* | |
* Safe Search and Replace on Database with Serialized Data v2.1.1 | |
* | |
* This script is to solve the problem of doing database search and replace when | |
* developers have only gone and used the non-relational concept of serializing | |
* PHP arrays into single database columns. It will search for all matching | |
* data on the database and change it, even if it's within a serialized PHP | |
* array. |
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
<IfModule mod_setenvif.c> | |
<IfModule mod_headers.c> | |
BrowserMatch MSIE ie | |
Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie | |
</IfModule> | |
</IfModule> | |
<FilesMatch "\.(ttf|otf|eot|woff|font.css)$"> | |
<IfModule mod_headers.c> | |
Header set Access-Control-Allow-Origin "*" |
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
//Which version of Ruby | |
ruby -v | |
//install bundles | |
bundle install | |
//install bundler | |
gem install bundler | |
//Database commands |
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
# Make a new cron job | |
crontab -e | |
# List your cron jobs | |
crontab -l | |
# Example cron command using artisan | |
0/5 * * * * /usr/bin/php /Users/joshua/Dropbox/htdocs/laravel/artisan cron:run |
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 artisan key:generate | |
php artisan session:table | |
php artisan migrate:install | |
php artisan migrate | |
php artisan migrate application | |
php artisan migrate bundle | |
php artisan migrate:rollback | |
php artisan migrate:reset |
OlderNewer