Skip to content

Instantly share code, notes, and snippets.

View joshed-io's full-sized avatar

Josh Dzielak joshed-io

View GitHub Profile
@mathieul
mathieul / gist:966776
Created May 11, 2011 16:12
Require files using RequireJS before running Jasmine specs
/*
* jasmine.requirejs() returns a function that will load the file(s) required
* and will wait until it's done before proceeding with running specs.
* The function returned is intended to be passed to beforeEach() so the file(s)
* is(are) loaded before running each spec.
*
* Syntax:
*
* jasmine.requirejs(options, files)
* or
@paulmillr
paulmillr / active.md
Last active July 15, 2024 10:55
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
@IanVaughan
IanVaughan / uninstall_gems.sh
Created June 9, 2012 20:37
Uninstall all rbenv gems
#!/usr/bin/env bash
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}
@joshed-io
joshed-io / keen_io_zrank.rb
Last active December 18, 2015 17:09
A simple Ruby script illustrating how to implement Redis-style ZRANK on the result of a Keen IO group_by query
# Example Keen IO API response for a count, grouped by an 'entry' field
keen_result = [
{
"entry" => "Apple",
"result" => 15
},
{
"entry" => "Orange",
"result" => 10
},
@mrflip
mrflip / tuning_storm_trident.asciidoc
Last active May 27, 2022 23:59
Notes on Storm+Trident tuning

Tuning Storm+Trident

Tuning a dataflow system is easy:

The First Rule of Dataflow Tuning:
* Ensure each stage is always ready to accept records, and
* Deliver each processed record promptly to its destination
@wetzler
wetzler / gist:6629918
Last active February 23, 2019 21:31
a key with magical powers
d90e5b5598497773de1c57407dd54d65934ba1b5911f6f47311d3c729f510bb5c295284780017a56f17e49234f19c009bfa57f7941413a5dd3c282d7db3692a192b58ea926b637cdcd11377e1e74086641e0672c8b3406aeed49d63ee0a3a3d3751ae7744f08b999df38ca2ccdbb9a2c
@dustinlarimer
dustinlarimer / README.md
Last active August 29, 2015 13:57
GeoCharts with Keen IO

GeoCharts with Keen IO

This recipe uses geographic properties generated by the ip_to_geo data enrichment addon.

If you would like to activate this addon for your project, just ask!

The team is available in HipChat, IRC, or at contact@keen.io.

@weilu
weilu / auth.js
Last active August 20, 2019 15:35
Cloudant create user
var cradle = require('cradle');
var crypto = require('crypto');
cradle.setup({
host: 'foo.cloudant.com',
port: 80,
cache: false,
timeout: 5000
})
@wetzler
wetzler / gist:2ef7d45072cf4d92c16f
Last active August 29, 2015 14:04
Pull and sort of bunch of session events from Keen IO
require 'rubygems'
require 'net/http' # This is probably not needed, did not validate which things are truly required...
require 'net/https'
require 'keen'
require 'json'
require 'date'
require 'time'
require 'set'
NUM_LATEST_SESSIONS = 1000
@plamere
plamere / parse.py
Last active August 29, 2015 14:04
parses outside lands lineup and generates a json of artists along with Spotify, Echo Nest and Rdio IDs
import sys
from bs4 import BeautifulSoup
import json
import pyen
en = pyen.Pyen()
def get_fid(artist, idspace):
if 'foreign_ids' in artist and len(artist['foreign_ids']) > 0:
for fids in artist['foreign_ids']:
if fids['catalog'] == idspace: