Skip to content

Instantly share code, notes, and snippets.

@rameshdharan
rameshdharan / lz-string-decompress
Created January 5, 2018 22:42
Decompress base64-encoded lz-string files
#! /usr/bin/env node
var lzString = require('lz-string');
var fs = require('fs');
if (process.argv.length < 3) {
console.error('Usage: lz-string-decompress <input_file>');
process.exit(1);
}
console.log(lzString.decompressFromBase64(fs.readFileSync(process.argv[2], {
@rameshdharan
rameshdharan / noNullPoints.patch
Created November 14, 2016 22:10
Patch to backport noNullPoints support to Graphite webapp 0.9.15
diff --git a/webapp/graphite/render/views.py b/webapp/graphite/render/views.py
index 62ad20e..b15b012 100644
--- a/webapp/graphite/render/views.py
+++ b/webapp/graphite/render/views.py
@@ -153,6 +153,15 @@ def renderView(request):
timestamps = range(int(series.start), int(series.end) + 1, int(series.step))
datapoints = zip(series, timestamps)
series_data.append(dict(target=series.name, datapoints=datapoints))
+ elif 'noNullPoints' in requestOptions and any(data):
+ for series in data:

Keybase proof

I hereby claim:

  • I am rameshdharan on github.
  • I am ramesh (https://keybase.io/ramesh) on keybase.
  • I have a public key whose fingerprint is 3B7A CB7A 4ED0 C191 58A3 4217 1636 CF2C 91CE 7C3F

To claim this, I am signing this object:

@rameshdharan
rameshdharan / RadiantPlayerSetMessagesStatus
Last active August 29, 2015 14:17
Script to set Apple Messages app status based on current playing song in Radiant Player.
on idle
tell application "Radiant Player"
set artist to current song artist
set track to current song name
set trackUrl to current song url
set playerState to player state
end tell
tell application "Messages"