Skip to content

Instantly share code, notes, and snippets.

View elliotbonneville's full-sized avatar
💭
Available for work!

Elliot Bonneville elliotbonneville

💭
Available for work!
View GitHub Profile
/*This source code copyrighted by Lazy Foo' Productions (2004-2020)
and may not be redistributed without written permission.*/
//Using SDL and standard IO
#include <SDL2/SDL.h>
#include <stdio.h>
//Screen dimension constants
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
var server = {
"development": "http://localhost:8000/",
"production": "http://myapp-production.herokuapp.com/",
"staging": "http://myapp-staging.herokuapp.com/"
}[process.env.NODE_ENV || "development"] + "myquery?parameter=VALUE";
@elliotbonneville
elliotbonneville / topkeywords.js
Last active August 23, 2022 10:26
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++;