This file contains 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
hdiutil makehybrid -o ~/Desktop/image.iso ~/path/to/folder/to/be/converted -iso -joliet |
This file contains 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
def scrub_email(email): | |
""" Takes an email address and masks the left side. test@test.com becomes t***@test.com """ | |
user, domain = email.split('@') | |
user = user[0].ljust(len(user), "*") | |
return("{}@{}".format(user, domain)) |
This file contains 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
pv mydump.sql.gz | gunzip | mysql -u root -p dbname |
This file contains 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
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch wp-content/uploads" HEAD |
This file contains 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
pbcopy < ~/.ssh/id_rsa.pub |
This file contains 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
npm install --save-dev gulp gulp-util gulp-uglify gulp-watch gulp-concat gulp-notify gulp-livereload gulp-ruby-sass |
This file contains 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
$ mkdir -p ~/Library/LaunchAgents | |
$ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents | |
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist | |
$ mysql.server start |
This file contains 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 (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i)) { | |
var viewportmeta = document.querySelector('meta[name="viewport"]'); | |
if (viewportmeta) { | |
viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0'; | |
document.body.addEventListener('gesturestart', function () { | |
viewportmeta.content = 'width=device-width, minimum-scale=0.25, maximum-scale=1.6'; | |
}, false); | |
} | |
} |
This file contains 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 remove_menus () { | |
global $menu; | |
$restricted = array( | |
// __('Dashboard'), | |
__('Posts'), | |
// __('Media'), | |
// __('Links'), | |
// __('Pages'), | |
// __('Appearance'), | |
// __('Tools'), |
This file contains 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
add_action( 'init', 'create_type' ); | |
function create_type() { | |
register_post_type( 'type', | |
array( | |
'labels' => array( | |
'name' => __( 'Types' ), | |
'singular_name' => __( 'Type' ) | |
), | |
'public' => true, | |
'has_archive' => true, |