Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:
[
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}
}| /* | |
| * object.watch polyfill | |
| * | |
| * 2012-04-03 | |
| * | |
| * By Eli Grey, http://eligrey.com | |
| * Public Domain. | |
| * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
| */ |
| <?php | |
| /** | |
| * get_columns_array | |
| * | |
| * Columns for the loop, single function interface (limited) | |
| * | |
| * Copyright (c) 2011 hakre <http://hakre.wordpress.com/>, some rights reserved | |
| * | |
| * USAGE: |
| /* **She grows old and feeble** */ | |
| //...But she would always have to return back to her dull world of chores and grown-ups. | |
| return function() { | |
| // And her latest story would be filled with wonder | |
| latestStory = adventures[adventures.length - 1]; | |
| // But time is a bitch... | |
| setInterval(function() { | |
| // and our dear princess can't help but forget her adventures, |
| <html> | |
| <head> | |
| <title>jsonp test</title> | |
| <script src="http://code.jquery.com/jquery-1.6.2.min.js"></script> | |
| <script type="text/javascript"> | |
| $(function(){ | |
| $('#select_link').click(function(e){ | |
| e.preventDefault(); | |
| console.log('select_link clicked'); | |
| [ | |
| {name: 'Afghanistan', code: 'AF'}, | |
| {name: 'Åland Islands', code: 'AX'}, | |
| {name: 'Albania', code: 'AL'}, | |
| {name: 'Algeria', code: 'DZ'}, | |
| {name: 'American Samoa', code: 'AS'}, | |
| {name: 'AndorrA', code: 'AD'}, | |
| {name: 'Angola', code: 'AO'}, | |
| {name: 'Anguilla', code: 'AI'}, | |
| {name: 'Antarctica', code: 'AQ'}, |
| <? | |
| if( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['insert_post'] )) { //check that our form was submitted | |
| $title = $_POST['thread_title']; //set our title | |
| if ($_POST['thread_description']=="") { // check if a description was entered | |
| $description = "See thread title..."; // if not, use placeholder | |
| } else { | |
| $description = $_POST['thread_description']; //if so, use it |
Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:
[
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}
}| <?php | |
| function themename_customize_register($wp_customize){ | |
| $wp_customize->add_section('themename_color_scheme', array( | |
| 'title' => __('Color Scheme', 'themename'), | |
| 'priority' => 120, | |
| )); | |
| // ============================= |
| HTMLElement = typeof(HTMLElement) != 'undefiend' ? HTMLElement : Element; | |
| HTMLElement.prototype.addClass = function(string) { | |
| if (!(string instanceof Array)) { | |
| string = string.split(' '); | |
| } | |
| for(var i = 0, len = string.length; i < len; ++i) { | |
| if (string[i] && !new RegExp('(\\s+|^)' + string[i] + '(\\s+|$)').test(this.className)) { | |
| this.className = this.className.trim() + ' ' + string[i]; | |
| } |
| /vendor |