Skip to content

Instantly share code, notes, and snippets.

"name": "Let's Do It Again",
"artistName": "J Boog",
"name": "Cream On Chrome",
"artistName": "Ratatat",
"name": "Get Free (feat. Amber of Dirty Projectors)",
"artistName": "Major Lazer",
"name": "Watch Out For This (Bumaye) [feat. Busy Signal, The Flexican & FS Green]",
"artistName": "Major Lazer",
"name": "Purple Yellow Red and Blue",
require 'redis'
require 'faker'
client = Redis.new(:host=> '{REDIS_HOST}', :port => '6379')
keysCreated = 0
for i in 0..3600 # 1 hour, 3600 keys created.
fakename = Faker::App.name
@lolpack
lolpack / no-resp-server.py
Last active December 3, 2015 20:54
Null Response Server
#!/usr/bin/python
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
PORT_NUMBER = 8080
#This class will handles any incoming request from
#the browser
class myHandler(BaseHTTPRequestHandler):
#Handler for the GET requests
@lolpack
lolpack / gist:7791859
Created December 4, 2013 17:30
Friends solution
//Friends JS
var friends = {
Tom: ["Mary", "Adam", "Brian"],
Mary: ["Tom", "Jane", "Peter", "Adam", "Elizabeth", "Brian", "Donna"],
Jane: ["Peter", "Mary", "Kimberly", "Emily", "Laura"],
Peter: ["Mary"],
Adam: ["Mary", "Tom"],
Elizabteh: ["Jennifer", "Mary"],
Jennifer: ["Elizabeth"],
@lolpack
lolpack / gist:7458016
Created November 13, 2013 22:55
Stack and Queue
// Queue Implementation
/* enqueue(data) - Adds a new data element to the queue
The parameter, data, should be the element to add.
dequeue(callback) - Removes the next item from the queue
The parameter to dequeue is a callback function that should expect two parameters - err and value. The callback's first param, err, is set to null if the queue operation was successful or "Empty" if the queue is currently empty. The callback's second parameter, value, is the value removed from the queue.
size() - Return the number of elements current in the queue
As with your stack implementation, you are not allowed to use the JavaScript array or any 3rd party libraries. Place your solution in a file called queue.js and upload it as submission of your assignment.*/