create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
git diff --no-prefix | sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" --ignore-space-at-eol > changes.patch |
return View.extend({ | |
initialize: function () { | |
this.el.attr("draggable", "true") | |
this.el.bind("dragstart", _.bind(this._dragStartEvent, this)) | |
}, | |
_dragStartEvent: function (e) { | |
var data | |
if (e.originalEvent) e = e.originalEvent | |
e.dataTransfer.effectAllowed = "copy" // default to copy |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
<?php | |
/* | |
Usage: | |
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL | |
if ( !$frag->output() ) { // NOTE, testing for a return of false | |
functions_that_do_stuff_live(); | |
these_should_echo(); | |
// IMPORTANT | |
$frag->store(); | |
// YOU CANNOT FORGET THIS. If you do, the site will break. |
<?php | |
/* Custom Config for Batcache */ | |
// Determine if this is a WP Touch User Agent | |
function is_wptouch_user_agent() { | |
// This needs to match your WP Touch list!! | |
$useragents = array( | |
// Apple iOS/Webkit | |
"iphone", "ipod", "incognito", "webmate", | |
// Android OS |
<figure class="quote"> | |
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote> | |
</figure> |
<?php | |
if ( !class_exists( 'WP_Smart_Cache_v1' ) ) : | |
Class WP_Smart_Cache_v1 { | |
static $instances = array(); | |
public function __construct() { | |
if ( function_exists( 'wp_cache_add_global_groups' ) ) | |
wp_cache_add_global_groups( array( 'wp_smart_cache_global' ) ); | |
} |
/** | |
* Custom Gallery Setting | |
*/ | |
( function( $ ) { | |
var media = wp.media; | |
// Wrap the render() function to append controls | |
media.view.Settings.Gallery = media.view.Settings.Gallery.extend({ | |
render: function() { | |
media.view.Settings.prototype.render.apply( this, arguments ); |
Problem: When linking to the raw version of a gist, the link changes with each revision.
Solution:
To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/
To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]