Skip to content

Instantly share code, notes, and snippets.

View charl-kruger's full-sized avatar

Charl Kruger charl-kruger

  • Investec
  • South Africa
View GitHub Profile
@charl-kruger
charl-kruger / stream.js
Created November 12, 2017 20:48 — forked from takinbo/stream.js
stream trading events from Luno.com
var WebsocketClient = require('websocket').client,
colors = require('colors'),
sprintf = require('sprintf-js').sprintf;
var ws = new WebsocketClient();
var asks = bids = {};
var now = function () {
var date = new Date();
return sprintf("%02d:%02d:%02d", date.getHours(), date.getMinutes(), date.getSeconds());
@elliotbonneville
elliotbonneville / topkeywords.js
Last active April 5, 2025 00:41
Find top keywords associated with a Google search with this Node.js application.
var request = require("request"),
cheerio = require("cheerio"),
url = "https://www.google.com/search?q=data+mining",
corpus = {},
totalResults = 0,
resultsDownloaded = 0;
function callback () {
resultsDownloaded++;