Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
<?php | |
// get all options in array from OPTIONS table | |
get_alloptions(); | |
// cache database query, so you don't have to query database again | |
$activity_object = wp_cache_get($id,'activity'); | |
if(false === $activity_object){ | |
$activity_object = $wpdb->get_row( | |
$wpdb->prepare("SELECT*FROM | |
$wpdb->activity WHERE ID = %d",$id)); |
<?php | |
global $user_ID, $user_identity, $user_level; | |
if ($user_ID) { | |
if($_POST) | |
{ | |
<?PHP | |
/* | |
neat_r works like print_r but with much less visual clutter. | |
By Jake Lodwick. Copy freely. | |
Example with an array: | |
$data = array( | |
"mode" => "sets", |
@font-face { | |
font-family: '[set]Foundicons'; | |
src: url('fonts/[set]_foundicons.eot'); | |
src: url('fonts/[set]_foundicons.eot?#iefix') format('embedded-opentype'), | |
url('fonts/[set]_foundicons.woff') format('woff'), | |
url('fonts/[set]_foundicons.ttf') format('truetype'), | |
url('fonts/[set]_foundicons.svg#[set]Foundicons') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
/* | |
Use this with https://github.com/fgnass/spin.js | |
You can now create a spinner using any of the variants below: | |
$("#el").spin(); // Produces default Spinner using the text color of #el. | |
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el. | |
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color). | |
$("#el").spin({ ... }); // Produces a Spinner using your custom settings. | |
$("#el").spin(false); // Kills the spinner. |
/* | |
Example by Andrew Wirick | |
originally: http://enterprisejquery.com/2010/07/create-your-first-jquery-plugin-part-1-transition-from-everyday-jquery-code-to-base-plugin/ | |
*/ | |
(function ($, undefined) { | |
var queueName = 'myFlashMessage'; | |
$.fn.myFlashMessage = function (params) { |
html { | |
background: url(images/bg.jpg) no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} |
<!-- example for the http://retinafy.me ebook --> | |
<style> | |
div.rss { | |
background: url(rss.svg); | |
width: 32px; | |
height: 32px; | |
} | |
body.no-svg div.rss { |