Skip to content

Instantly share code, notes, and snippets.

View JonathanMatthey's full-sized avatar

Jonathan Matthey JonathanMatthey

View GitHub Profile
@JonathanMatthey
JonathanMatthey / gist:98597fb6d7a733b4236171bce6408e42
Created August 15, 2022 20:07
rainforestQA-follow function
var getJSON = function(url, callback) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'json';
xhr.onload = function() {
var status = xhr.status;
if (status === 200) {
callback(null, xhr.response);
} else {
callback(status, xhr.response);
<!doctype html>
<html lang="en">
<head>
<title>Objects Ex 2</title>
<script>
var library = [
{
author: 'Bill Gates',
@JonathanMatthey
JonathanMatthey / scripted-objects1
Last active April 12, 2016 13:06
scripted-objects1
<!doctype html>
<html lang="en">
<head>
<title>Cars ex 1</title>
<script>
var cars ={
Beetle: {
color: "orange",
year: 2005
@JonathanMatthey
JonathanMatthey / hn_seach.js
Created March 22, 2016 02:18 — forked from kristopolous/hn_seach.js
hn job query search
function query() {
var
// HN is done with very unsemantic classes.
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')),
query_list = Array.prototype.slice.call(arguments),
shown = 0, total = job_list.length;
// Traverses up the dom stack trying to find a match of a specific class
function up_to(node, klass) {
if (node.className === klass) {
@JonathanMatthey
JonathanMatthey / hudsongray-update-instructions.md
Last active August 29, 2015 14:17
Updating HudsonGray.com Instructions
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
PoetryIpsum - LoremIpsum generator from Poets like Oscar Wilde
---
http://www.pommyipsum.com/
http://www.cupcakeipsum.com/
---
DesignCuration?
CSSKING.com
// 0RW3LL WAS ERE
//
// UNINSTALL BLOOMBERG - USE REUTERS...
// BLOOMBERG SCANDAL - PLEASE READ
// http://www.huffingtonpost.com/tag/bloomberg-terminal-scandal/
//
//Problem : Giga Ball
//Language : Javascript
//Compiled Using : V8
//Version : Node 0.10.25
@JonathanMatthey
JonathanMatthey / gist:d65a400ad9ea2c86b9ce
Last active August 29, 2015 14:01
codecon bloomberg 4
//Problem : The Verbal Literal
//Language : Javascript
//Compiled Using : V8
//Version : Node 0.10.25
//Input for your program will be provided from STDIN
//Print out all output from your program to STDOUT
//0rw3ll
//0rw3ll
var readline = require('readline'),
// 0RW3LL WAS ERE
//
// UNINSTALL BLOOMBERG - USE REUTERS...
// BLOOMBERG SCANDAL - PLEASE READ
// http://www.huffingtonpost.com/tag/bloomberg-terminal-scandal/
//
//Problem : Mug Color
//Language : Javascript
//Compiled Using : V8
//Version : Node 0.10.25