Skip to content

Instantly share code, notes, and snippets.

View vmasek's full-sized avatar
:bowtie:

Vojtech Mašek vmasek

:bowtie:
View GitHub Profile
@petomalina
petomalina / core_response.go
Last active January 24, 2016 08:45
[Golang] MongoDB REST controller snippet for atom
import (
"encoding/json"
"net/http"
)
// SendJSON will write the response with the OK
// http code
func SendJSON(obj interface{}, w http.ResponseWriter) error {
return SendJSONCode(http.StatusOK, obj, w)
}
@jirutka
jirutka / sample.png
Last active December 7, 2025 20:17
Nested numbered list with correct indentation in CSS. Live example at http://jsfiddle.net/a84enL8k/.
sample.png
@wilk
wilk / Ruby Notepad Bookmarklet
Last active February 16, 2023 19:49 — forked from jakeonrails/Ruby Notepad Bookmarklet
Javascript in-browser editor with CTRL+SHIFT+Y shortcut to execute the content. Just put it in your address bar and press enter. It works only on Chrome.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/javascript");addEventListener('keydown',function(evt){if(evt.ctrlKey && evt.shiftKey && evt.keyCode==89) eval(e.getSession().getValue());});</script>