Skip to content

Instantly share code, notes, and snippets.

View cdcarson's full-sized avatar

Chris Carson cdcarson

View GitHub Profile
<?php
//in index.php…
echo 'hello world';
mkdir myapp && cd myapp
git init
#in .gitignore...
.DS_Store
.idea
@cdcarson
cdcarson / gist:9009076
Last active August 29, 2015 13:56
Bad Git Commands
$ git granch orig
git: 'granch' is not a git command. See 'git --help'.
Did you mean this?
branch
@cdcarson
cdcarson / gist:8564148
Created January 22, 2014 18:15
setting the composer timeout
COMPOSER_PROCESS_TIMEOUT=2000 composer update
@cdcarson
cdcarson / gist:8045326
Last active December 31, 2015 21:09
filter the title attribute of the login header image
<?php
add_filter(
'login_headertitle',
function($title){
return get_bloginfo('name');
}, 10, 1
);
@cdcarson
cdcarson / gist:8045158
Last active December 31, 2015 21:09
filter the url to which the login header points
<?php
add_filter(
'login_headerurl',
function($url){
return get_bloginfo('url');
}, 10, 1
);
@cdcarson
cdcarson / gist:6131701
Created August 1, 2013 14:09
changing the url of a networked blog
UPDATE wp_2_posts SET post_content = REPLACE( post_content, 'events.therealtimereport.com/lab', 'events.therealtimereport.com/realtime-marketing-lab' ) WHERE post_content LIKE '%events.therealtimereport.com/lab%'
UPDATE wp_2_posts SET guid = REPLACE( guid, 'events.therealtimereport.com/lab', 'events.therealtimereport.com/realtime-marketing-lab' ) WHERE guid LIKE '%events.therealtimereport.com/lab%'
@cdcarson
cdcarson / gist:5929167
Created July 4, 2013 17:12
List of Terminal shortcuts
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + L Clears the Screen, similar to the clear command
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + H Same as backspace
Ctrl + R Let’s you search through previously used commands
Ctrl + C Kill whatever you are running
Ctrl + D Exit the current shell
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + W Delete the word before the cursor
@cdcarson
cdcarson / gist:4981186
Last active December 13, 2015 21:58
Adding the WordPress jQuery Color Picker
jQuery(document).ready(function($){
$('input.color').wpColorPicker();
});