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}"
}
}
$(function(){ | |
$("section.page").hide(); | |
var hash = window.location.hash; | |
if(hash){ | |
$('a[href$="'+hash+'"]').parent().addClass('active').siblings('li.active').removeClass("active"); | |
$('section'+hash).show(); | |
console.log(hash); | |
check_for_dark($('section'+hash)); | |
}else{ |
startup_message off | |
screen -t serve | |
screen -t git | |
select 0 | |
autodetach on | |
term screen-256color | |
termcapinfo xterm-256color|xterm-color|xterm|xterms|xs|rxvt ti@:te@ | |
altscreen on | |
hardstatus on |
/** | |
* Load disqus comments when visitor scroll down page to comments | |
* | |
* Usage: | |
* Add a div with id "disqus_thread" and data attributes for every disqus parameter: | |
* | |
* <div id="disqus_thread" data-disqus-shortname="username" data-disqus-url="http://example.com/post/post-name/"></div> | |
* | |
* @author: Murat Corlu | |
* @link: https://gist.github.com/gists/2290198 |
perl -pi -w -e 's/<search string>/<replace string>/g;' `grep -ril "<search string>" *` |
# place this in your ~/.bashrc | |
# restart terminal, or run 'source ~/.bashrc' | |
# use `gatt` command like a bowss | |
# ??? | |
# Profit! | |
# name/idea/demand from @tmayr | |
# gatt "branch" "message" | |
# or | |
# gatt "message" |
$(function(){ | |
$('.ytembed:not(.processed)').addClass('processed').each(function() { | |
$(this).find('a').click(function(e) { | |
e.preventDefault(); | |
var width = $(this).find('img').width(); | |
var height = $(this).find('img').height(); | |
var url = $(this).attr('href'); | |
var $iframe = $('<iframe src="'+url+'" width="'+width+'" height="'+height+'" frameborder="0"/>'); | |
$(this).parent().html($iframe); | |
}); |
<!-- you need a div with the class 'ytembed' --> | |
<div class="ytembed"> | |
<!-- put a link with the url + embed options of your video --> | |
<a href="http://www.youtube.com/watch?v=dQw4w9WgXcQ?rel=0&showinfo=0&autohide=1&autoplay=1&wmode=transparent"> | |
<!-- and a thumbnail, with the width/height specified --> | |
<img width="560" height="315" src="/path/to/custom_thumbnail.jpg" alt="Click to play"/> | |
</a> | |
</div> |
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}"
}
}
# Usage: | |
# workdone [time period] [committer email] | |
workdone(){ | |
default="1 day ago" | |
email="[your email here]" | |
git log --committer=${2:-$email} --pretty=format:"%Cgreen%ar (%h)%n%Creset> %s %b%n" --since="${1:-$default}" --no-merges | |
} |
startup_message off | |
screen -t serve | |
screen -t git | |
select 0 | |
autodetach on | |
term screen-256color | |
termcapinfo xterm-256color|xterm-color|xterm|xterms|xs|rxvt ti@:te@ | |
altscreen on | |
hardstatus on |