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}"
}
}
Iterators = (function() { | |
var each, map, filter, reduce, toArray, toObject; | |
function _map(iter, f) { | |
return { | |
hasNext: iter.hasNext, | |
next: function() { return f(iter.next()); } | |
}; | |
} | |
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}"
}
}
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/sh | |
# Sublime Text 3 Install (last update: Monday 13 March 2017) | |
# | |
# No need to download this script, just run it on your terminal: | |
# | |
# curl -L git.io/sublimetext | sh | |
# Detect the architecture |
These rules are adopted from the AngularJS commit conventions.
#!/bin/bash | |
# | |
# Writes sources.list in order to add non-free repository | |
# | |
DEBIAN_RELEASE=`cat /etc/*-release 2> /dev/null | grep PRETTY_NAME | awk -F "=" {'print $2'} | awk -F "(" {'print $2'} | awk -F ")" {'print $1'}` | |
echo "Writes /etc/apt/sources.list in order to add $DEBIAN_RELEASE non-free repository" |
[global] | |
font = Helvetica 8 | |
# allow a small subset of html markup: | |
# <b>bold</b> | |
# <i>italic</i> | |
# <s>strikethrough<s/> | |
# <u>underline</u> | |
# | |
# for a complete reference see http://developer.gnome.org/pango/stable/PangoMarkupFormat.html |
/* | |
The MIT License (MIT) | |
Copyright (c) 2014 | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
by @rane
Tori.fi, a Finnish online marketplace based on blocket.se, has a category selection input that dynamically reveals sub-categories as user selects them.
It works like this: