Skip to content

Instantly share code, notes, and snippets.

@alexpos
alexpos / gist:2837152
Created May 30, 2012 15:52
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@alexpos
alexpos / quix.txt
Created July 9, 2012 11:47
Quix file - testing
@Brett's Bookmarklets
@Brett's bookmarklets, gathered conveniently in one place :)
md javascript:location.href='http://heckyesmarkdown.com/go/?read=1&preview=0&showframe=0&u='+encodeURIComponent(document.location.href); Get Raw Markdown for page
mdp javascript:location.href='http://heckyesmarkdown.com/go/?read=1&preview=0&showframe=1&u='+encodeURIComponent(document.location.href); Get Markdown Preview for page
2text javascript:location.href='http://www.aaronsw.com/2002/html2text/?url='+document.location.href; HTML2Text
@alexpos
alexpos / gist:3907495
Created October 17, 2012 19:13 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@alexpos
alexpos / brettquix.txt
Created October 22, 2012 13:47 — forked from ttscoff/brettquix.txt
Brett's Quix File
@Brett's searches
@Brett's custom searches
go https://duckduckgo.com/?q=%21%20%s Open first result (DuckDuckGo)
b https://duckduckgo.com/?q=%21%s Bang search (DuckDuckGo)
grep https://www.cueup.com/?q=%s&fq=1 Greplin
ss https://duckduckgo.com/site:%d%20%s Current site (DuckDuckGo)
bt https://duckduckgo.com/site:brettterpstra.com%20%s BrettTerpstra.com (DuckDuckGo)
gh http://github.com/search?q=%s&type=Everything&repo=&langOverride=&start_value=1 Search GitHub (everything)
hints http://hints.macworld.com/search.php?query=%s&keyType=all&datestart=&dateend=&topic=0&type=stories&results=50&mode=search Search Mac OS X Hints
mu http://www.macupdate.com/find/mac/%s Search MacUpdate (Software)
@alexpos
alexpos / Example 1
Created December 13, 2012 17:39
Several examples how to use python-wordpress-xmlrpc to post to wordpress
from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods.posts import NewPost
#authenticate
wp_url = "http://192.168.50.100:8051/xmlrpc.php"
wp_username = "admin"
wp_password = "12"
wp = Client(wp_url, wp_username, wp_password)
#post and activate new post
// Open up the media manager to handle editing image metadata.
$('#soliloquy-area').on('click.soliloquyModify', '.modify-image', function(e) {
e.preventDefault();
var soliloquy_frames = {}; // Store our workflows in an object
var frame_id = $(this).next().attr('id').split('-')[3]; // Unique ID for each workflow
var default_view = wp.media.view.AttachmentsBrowser; // Store the default view to restore it later
// If the media frame already exists, reopen it.
if ( soliloquy_frames[frame_id] ) {
soliloquy_frames[frame_id].open();
<?php
function location_setup() {
$prefix = PREFIX;
$config = array(
'id' => 'gmap3_meta_box', // meta box id, unique per meta box
'title' => __('City Guide Map', LOCALIZATION), // meta box title
'pages' => array('location','post'), // post types, accept custom post types as well, default is array('post'); optional
'context' => 'normal', // where the meta box appear: normal (default), advanced, side; optional
'priority' => 'high', // order of meta box: high (default), low; optional

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@alexpos
alexpos / Preferences.sublime-settings
Created January 10, 2013 10:01
Sublime text - settings & snippets
{
//Plovs' Preferences.sublime-settings
// Theme Settings
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",
"fade_fold_buttons": false,
"bold_folder_labels": true,
"font_face": "Source Code Pro",
"font_size": 12.0,
@alexpos
alexpos / gist:4984392
Created February 19, 2013 09:35
Mac Apps

#The best Mac Apps

This is a list of the apps I use, hve used, or would like to use.

Writing

  • Marked - markdown (and html) previewer. Also easy pdf export for simple documents [^use]

Files