Skip to content

Instantly share code, notes, and snippets.

View mxgrn's full-sized avatar

Max Gorin mxgrn

View GitHub Profile
@mxgrn
mxgrn / gist:5402155
Last active October 19, 2018 02:19 — forked from billygoat/gist:5320505
Adds a new entry in nvALT, with title set to page title, tags set to "bookmarks", and body containing page title, link, and text selected on page (if present).
/* Source code */
javascript:(function(){
var w=window,d=document,pageSelectedTxt=w.getSelection?w.getSelection():(d.getSelection)?d.getSelection():(d.selection?d.selection.createRange().text:0),pageTitle=d.title,pageUri=w.location.href,tmplt="";
tmplt="Title: "+pageTitle+"\nLink: "+pageUri+"\n";
if (pageSelectedTxt != "") {
pageSelectedTxt="\n---\n"+pageSelectedTxt;
}
w.location.href="nvalt://make/?txt="+encodeURIComponent(tmplt+pageSelectedTxt)+"&title="+encodeURIComponent(pageTitle)+"&tags=bookmarks";
})();

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh [email protected]

Add ssh fingerprint and enter password provided in email