| Ctrl+KB | toggle side bar |
| Ctrl+Shift+P | command prompt |
| Ctrl+` | python console |
| Ctrl+N | new file |
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
| // Released under MIT license: http://www.opensource.org/licenses/mit-license.php | |
| $('[placeholder]').focus(function() { | |
| var input = $(this); | |
| if (input.val() == input.attr('placeholder')) { | |
| input.val(''); | |
| input.removeClass('placeholder'); | |
| } | |
| }).blur(function() { | |
| var input = $(this); |
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
| <script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script> |
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
| source 'https://rubygems.org' | |
| gem 'faye' | |
| gem 'foreman' | |
| gem 'thin' |
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
| // | |
| // Part 1: Customize registration form | |
| // | |
| // | |
| // A. Show extra fields on registration form | |
| // | |
| add_action( 'register_form', 'ac_extra_reg_fields', 1 ); | |
| function ac_extra_reg_fields() { ?> |
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
| wp() { | |
| # Needs two parameters | |
| # Parameter 1 is the account name, or install directory | |
| # Parameter 2 will set the database password | |
| cd ~/../home/${1}/public_html # go to install directory | |
| wget http://wordpress.org/latest.tar.gz # get latest WordPress | |
| tar xfz latest.tar.gz # unpack | |
| chown -R ${1} wordpress # change all files in wordpress to be owned by user (solves a problem when installing as root) | |
| chgrp -R ${1} wordpress # change associated group (solves a problem when installing as root) | |
| mv wordpress/* ./ # move all files from /wordpress to the root directory |
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
| function copyright($start, $owner) { | |
| $date = date('Y'); | |
| echo "© Copyright "; | |
| if ( $start < $date ) { | |
| echo "{$start} - "; | |
| } | |
| echo "{$date} {$owner}"; | |
| } | |
| /* |
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
| <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 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 | |
| /** | |
| * Dump helper. Functions to dump variables to the screen, in a nicley formatted manner. | |
| * @author Joost van Veen | |
| * @version 1.0 | |
| */ | |
| if (!function_exists('dump')) { | |
| function dump ($var, $label = 'Dump', $echo = TRUE) | |
| { | |
| // Store dump in variable |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>The HTML5 Template</title> | |
| <meta name="description" content="The HTML5 Template"> | |
| <link rel="stylesheet" href="css/styles.css?v=1.0"> | |
| <!--[if lt IE 9]> | |
| <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
| <![endif]--> |
NewerOlder