Skip to content

Instantly share code, notes, and snippets.

View stpe's full-sized avatar
👋
🏎💨

Stefan Pettersson stpe

👋
🏎💨
View GitHub Profile
@stpe
stpe / snippet.md
Created June 19, 2012 07:58 — forked from harthur/snippet.md
console.log() key binding for Sublime Text 2

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}"
 }, 
@stpe
stpe / gist:2949924
Created June 18, 2012 18:38
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
@stpe
stpe / mantisconnect_json.php
Created March 17, 2012 22:26
Simple JSON wrapper of Mantis SOAP API
<?php
/**
* Example usage (using jQuery):
* var url = "/path/mantisconnect_json.php?name=mc_project_get_issues&project_id=0&page_number=1&per_page=10";
* $.getJSON(url, function(data) {
* $.each(data, function() {
* console.log(data.id + ': ' data.summary);
* });
* });
*/