Skip to content

Instantly share code, notes, and snippets.

Jess Lilly jesslilly

  • US
View GitHub Profile
View removed.js
function foo() {
var er = new Error('foo() has been removed in favor of bar(). Please update your java scripts codes.')
Error.captureStackTrace(er, foo)
throw er
function bar() {
jesslilly /
Last active Aug 29, 2015
Jetty, Jersey, Guice, JAXB Sample
// See
public class Cake implements PlainTextBean {
private String type;
// The getter is up here since the order of fields affects the order in the
// xml.
public String getType() {
return type;
substack /
Last active Aug 29, 2015
warped mac startup sound
ytdl ''
ffmpeg -i *.mp4 -vn mac_startup.wav
sox mac_startup.wav mac_warp.mp3 chorus 0.6 0.9 25 0.9 1 8 -s \
echos 0.8 0.7 40 0.25 63 0.3 phaser 1 0.7 3 0.7 0.5 -t
play mac_startup.wav
View gist:9699038
<p>The files that could have been potentially accessed included a ton of sensitive information: SSL keys, database passwords with read/write access to our production databases, basically everything you never want a third party to see. Somebody with access to the database could replace npm modules with malicious payloads. I don't want to blur the truth here: this could have been a disaster. It is very much like the <a href=""> security breach</a> in early 2013, and we are similarly lucky that the effect was not much much worse.</p>
<p>Thankfully, there's no evidence that, other than ourselves, the engineers who reported the bugs, and a few members of the GitHub security team who knew about the issue, anyone knew about this hole. But, in the interests of transparency, we should be clear that we can't <strong>prove</strong> that: the logs we kept at the time were not su
jesslilly / Hello.groovy
Last active Aug 29, 2015
Just a little groovy exploration
View Hello.groovy
#!/usr/bin/env groovy
// GROOVY STYLE!!!!!!!!!!!!!!!!
def a = new ArrayList<String>()
jesslilly / stack.js
Created Mar 16, 2014
Stack with push, pop, and min all of complexity O(1). With unit tests.
View stack.js
#!/usr/bin/env node
* Design a stack with a push, pop, and min method.
* Min returns the smallest element.
* All methods must operate in O(1) time.
* I implemented this with simple numbers, but I could enhance it
* to use objects with a comparator function.
View gist:9006411
$ find node_modules -name 'README*' | xargs wc -c | tail -1
531452 total
$ find static -type f | xargs wc -c | tail -1
820587 total
jesslilly / groupBy.js
Last active Jan 4, 2016
Function to group an array of x,y data. Useful for charting. Requires underscore.js.
View groupBy.js
* @method
* @public
* @description Take an array of objects and convert to an array of pairs whose
* xCol are grouped and yCol values are aggregated somehow. If
* grouping by day or month, dates must be in ZULU format strings!
* Original implementation returned an object with keys = xCol and
* values = yCol. It worked great but js maps(objects) cannot be
* sorted!
* @param {array}
jesslilly / logaxParserSpec.js
Created Jan 14, 2014
Parameterized jasmine test for your logax parser. This is a really good idea to make sure that minor changes to your parser don't break your JSON output. Thanks to for the parameterized test gist. This test is in javascript, not coffeescript. This is a template. You wi…
View logaxParserSpec.js
var fs = require('fs');
var exec = require('child_process').exec, child;
// Inputs
var inputDir = './developer/test/unit/data/input/';
var expectedDir = './developer/test/unit/data/expected/';
var outputDir = './developer/test/unit/data/output/';
var parserA = './server/load-it/logax-a-parser.js';
var parserB = './server/load-it/logax-b-parser.js';
var inputFiles = new Array(3);
Voles / datefilter.js
Created Apr 25, 2013
AngularJS daterange filter
View datefilter.js
RB.filter('daterange', function ()
return function(conversations, start_date, end_date)
var result = [];
// date filters
var start_date = (start_date && !isNaN(Date.parse(start_date))) ? Date.parse(start_date) : 0;
var end_date = (end_date && !isNaN(Date.parse(end_date))) ? Date.parse(end_date) : new Date().getTime();
You can’t perform that action at this time.