Skip to content

Instantly share code, notes, and snippets.

View tiborsaas's full-sized avatar
🛰️
29C4D3B40280AE810FB4A81681E4417B

Tibor Szász tiborsaas

🛰️
29C4D3B40280AE810FB4A81681E4417B
View GitHub Profile
<snippet>
<!-- put this file in /packages/User/<Folder Name>/console_log.sublime-snippet then restart your Sublime Text 2 -->
<content><![CDATA[console.log($1);$0]]></content>
<tabTrigger>con</tabTrigger>
<scope>text.html,source.js</scope>
<description>console.log()</description>
</snippet>
<snippet>
<!-- put this in another file /packages/User/<Folder Name>/console_dir.sublime-snippet then restart your Sublime Text 2 -->

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
@tiborsaas
tiborsaas / backboneglobalpubsub.md
Created May 29, 2012 18:27 — forked from addyosmani/backboneglobalpubsub.md
Backbone.js global pub/sub

Generally one implements notifications by listening for events on specific models but if one wishes to have a single global message interchange, it could be done as follows:

var pubsub = new Backbone.Model;

View1 = Backbone.View.extend({
  initialize: function(){
    pubsub.bind('custom event', callback);
  }
 // ...
@tiborsaas
tiborsaas / wave64.html
Created April 13, 2012 14:38 — forked from leemartin/wave64.html
$.wave64 Example with invert waveform
<html>
<head>
<title>SoundCloud $.wave64 Example</title>
<style>
body{
background: #333;
}
canvas{
display: block;