Skip to content

Instantly share code, notes, and snippets.

@Guigoz
Guigoz / GROOVY : Time duration
Created October 18, 2013 10:37
GROOVY : Time duration
def timeStart = new Date()
println groovy.time.TimeCategory.minus(new Date(), timeStart)
@Guigoz
Guigoz / JS : console.time()
Last active December 23, 2015 23:59
JS : console.time()
console.time('test');
console.timeEnd('test');
@Guigoz
Guigoz / Tommorow Night Theme
Last active December 21, 2015 19:19
SUBLIME TEXT : Tommorow Night theme update
<dict>
<key>name</key>
<string>diff.header</string>
<key>scope</key>
<string>meta.diff, meta.diff.header</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#666666</string>
</dict>
@Guigoz
Guigoz / SUBLIME TEXT 2 : keyboard shortcuts for AZERTY keyboards
Last active May 2, 2020 20:46
SUBLIME TEXT 2 : keyboard shortcuts for AZERTY keyboards
{ "keys": ["ctrl+œ"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{
"keys": ["super+alt+&"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
@Guigoz
Guigoz / GROOVY : Convert object to JSON
Last active November 29, 2021 13:42
GROOVY : Convert object to JSON
def builder = new groovy.json.JsonBuilder(data)
println builder.toString()
@Guigoz
Guigoz / JS : JSON.stringify
Created June 14, 2013 07:53
JSON.stringify
JSON.stringify($data, true, 4)