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
mysql -u root -p -h localhost foo <bar.sql |
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
<c:forEach varStatus="loopStatus"> | |
<tr class="${loopStatus.index % 2 == 0 ? 'odd' : 'even'}"> | |
... |
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
<?php $loop = new WP_Query( array( 'post_type' => 'post_type', 'posts_per_page' => 10 ) ); ?> | |
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?> | |
<article> | |
<a href="<?= get_permalink();?>"><h2><?= the_title();?></h2></a> | |
<?php the_excerpt(); ?> | |
</article> | |
<?php endwhile; ?> |
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, |
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
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
$ 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
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
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
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch wp-content/uploads" HEAD |