As configured in my dotfiles, here and here.
$ tmux -> start new
$ tmux new -s myname -> start new w/session name
$ tmux a # (or at, or attach) -> attach
$ tmux a -t myname -> attach to named
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
// http://stackoverflow.com/a/4541963 | |
var waitForFinalEvent = (function () { | |
var timers = {}; | |
return function (callback, ms, uniqueId) { | |
if (!uniqueId) { | |
uniqueId = "Don't call this twice without a uniqueId"; | |
} | |
if (timers[uniqueId]) { | |
clearTimeout (timers[uniqueId]); |
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen | |
and (min-width : 321px) { |
<?php | |
add_filter('the_content', 'rr_add_ad_inside_post'); | |
function rr_add_ad_inside_post($content) { | |
if ( is_single() ) { | |
$paragraphAfter= 3; //display after the first paragraph | |
$content = explode("", $content); | |
for ($i = 0; $i <count ($content); $i++ ) { | |
if ($i == $paragraphAfter) { ?> | |
<p class="alignleft"> | |
<script type="text/javascript"><!-- |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<script src="ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
</body> | |
</html> |
<?php | |
/* Example Usage: | |
* bt_add_image_size( 'product-screenshot', 300, 300, array( 'left', 'top' ) ); | |
* bt_add_image_size( 'product-feature', 460, 345, array( 'center', 'top' ) ); | |
*/ | |
add_filter( 'intermediate_image_sizes_advanced', 'bt_intermediate_image_sizes_advanced' ); | |
add_filter( 'wp_generate_attachment_metadata', 'bt_generate_attachment_metadata', 10, 2 ); | |
/** |