Skip to content

Instantly share code, notes, and snippets.

@abrahamfast
abrahamfast / .htaccess
Created July 17, 2016 06:06 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@abrahamfast
abrahamfast / migration.php
Created April 28, 2016 06:19 — forked from JeffreyWay/migration.php
What else would you want on a typical pivot table...say for posts and tags.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class PivotPostTagTable extends Migration {
/**
* Run the migrations.
*
@abrahamfast
abrahamfast / clock.js
Created April 28, 2016 06:12 — forked from sineld/clock.js
Create Your Own jQuery Digital Clock
/*
Create Your Own jQuery Digital Clock
http://www.sitepoint.com/create-jquery-digital-clock-jquery4u/
*/
<script>
function updateClock()
{
var currentTime = new Date ( );
var currentHours = currentTime.getHours ( );
@abrahamfast
abrahamfast / routes.sh
Created April 28, 2016 06:11 — forked from JeffreyWay/routes.sh
Add this to your ~/.bashrc file (or anywhere related) to give yourself an easy way to view the routes in your Laravel app, or filter the results down to a particular search query.
function routes()
{
if [ $# -eq 0 ]; then
php artisan route:list
else
php artisan route:list | grep ${1}
fi
}
@abrahamfast
abrahamfast / .bash_profile
Created April 28, 2016 06:07 — forked from JeffreyWay/.bash_profile
Prettier git logs
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@abrahamfast
abrahamfast / install.sh
Created April 28, 2016 05:55 — forked from JeffreyWay/install.sh
Super-fast LAMP + 5.5 install script.
sudo apt-get update
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
sudo apt-get install -y vim curl python-software-properties
sudo add-apt-repository -y ppa:ondrej/php5
sudo apt-get update
sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>