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 | |
add_filter( 'gettext', 'krogs_event_change_venue_name', 20, 3 ); | |
/** | |
* Change comment form default field names. | |
* | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
*/ | |
function krogs_event_change_venue_name( $translated_text, $text, $domain ) { |
jQuery(document).ready(function($){ | |
// Mobile navigation | |
$('#prim-selector, #sec-selector').change(function(){ | |
if ($(this).val()!='') { | |
window.location.href=$(this).val(); | |
} | |
}); | |
}); |
case 'page_select': | |
echo '<select name="', $field['id'], '" id="', $field['id'], '">'; | |
$linked_items = get_posts(array( | |
'post_type' => array ('page',), | |
'post_status' => 'publish', | |
'posts_per_page' => -1, | |
'orderby' => 'modified', | |
'order' => 'DESC' | |
)); | |
foreach ($linked_items as $linked_item) { |
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
<?php | |
/* | |
Plugin Name: Unplugged Mobile Theme | |
Plugin URI: http://www.rachelbaker.me | |
Description: A plugin and theme for WordPress that automatically reformats your blog's content for optimized viewing on Apple's <a href="http://www.apple.com/unplugged/">unplugged</a> and <a href="http://www.apple.com/ipodtouch/">iPod touch</a>. | |
Author: Rachel Baker | |
Version: 0.1 | |
Author URI: http://www.rachelbaker.me | |
# Special thanks to Imthiaz Rafiq and the wp-pda Plugin (http://imthi.com/wp-pda/) which this plugin is derived from. |
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client") | |
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime") | |
Function Get-SPOCredentials([string]$UserName,[string]$Password) | |
{ | |
if([string]::IsNullOrEmpty($Password)) { | |
$SecurePassword = Read-Host -Prompt "Enter the password" -AsSecureString | |
} |
//Edit this based on the max amount you want to spend on a given day. | |
var maxSpend = 1000; | |
function main () { | |
var currentAccount = AdWordsApp.currentAccount(); | |
var stats = currentAccount.getStatsFor("TODAY"); | |
var cost = stats.getCost(); | |
Logger.log("Account has spent " + cost + " so far."); | |
if (cost > maxSpend) { | |
campaign.pause(); |
function supportsWoff2() { | |
"use strict"; | |
/*global FontFace*/ | |
// Source: https://github.com/filamentgroup/woff2-feature-test | |
if (!window.FontFace) { | |
return false; | |
} else { | |
var f = new FontFace('t', 'url("data:application/font-woff2,") format("woff2")', {}); | |
f.load(); | |
return f.status === 'loading'; |
<?php | |
/** | |
* Get a list of post types that support a specific feature. | |
* | |
* @param $feature | |
* @return array | |
*/ | |
function get_post_types_supporting( $feature ) { | |
global $_wp_post_type_features; |