Skip to content

Instantly share code, notes, and snippets.

View vega-lite-1-13.json
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"title": "Visu interessante",
"data": {
"format": {
"property": "aggregations.sube.buckets"
},
"values": {
"took": 29,
"timed_out": false,
View parser.js
const TOKENS = {
START: 'start',
END: 'end',
};
function tokenize(code) {
let current = 0;
let startOfToken;
let tokens = [];
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div class="top">
Current value of color:
<span class="output"></span>
</div>
View index.html
<!DOCTYPE html>
<html>
<head>
<title>MyFace project</title>
<link href="https://fonts.googleapis.com/css?family=Bree+Serif|Open+Sans" rel="stylesheet">
</head>
<body>
<div class="container">
<img src="https://pbs.twimg.com/profile_images/899373060964352000/j14RRZaJ.jpg">
<h1>Wylie Conlon</h1>
@wylieconlon
wylieconlon / smart_host_api.txt
Created Mar 7, 2014
API sample for Smart Host
View smart_host_api.txt
# example API requests
#
# http://www.smarthost.me/api/1.0/price/?address=412 E 9th St, New York, NY&private_room=true&entire_home=false&occupancy=2
# http://www.smarthost.me/api/1.0/price/?address=brooklyn&private_room=true&entire_home=false&occupancy=2
{
"average": 113.07379375591296,
"city": "New York",
"count": 1057,
"latitude": 40.64522171020508,
@wylieconlon
wylieconlon / currencies.json
Last active Dec 15, 2015
List of currency codes and countries that use them, from ISO 4217 http://en.wikipedia.org/wiki/ISO_4217
View currencies.json
{
"AED": ["United Arab Emirates"],
"AFN": ["Afghanistan"],
"ALL": ["Albania"],
"AMD": ["Armenia"],
"ANG": ["Curaçao", "Sint Maarten"],
"AOA": ["Angola"],
"ARS": ["Argentina"],
"AUD": ["Australia", "Australian Antarctic Territory", "Christmas Island", "Cocos Islands", "Heard and McDonald Islands", "Kiribati", "Nauru", "Norfolk Island", "Tuvalu"],
"AWG": ["Aruba"],
View countries.txt
Afghanistan
Afghan
Albania
Algeria
Andorra
Angola
@wylieconlon
wylieconlon / high-dpi-media.css
Created Aug 24, 2012 — forked from marcedwards/high-dpi-media.css
A CSS media query that captures almost all high DPI aware devices.
View high-dpi-media.css
/* -------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs with IE zoomed in */
/* - Android hdpi devices and above */
/* - Android tvdpi devices, including Google Nexus 7 */
@wylieconlon
wylieconlon / boundedqueue.py
Created Feb 11, 2012
Queue with fixed maximum length
View boundedqueue.py
#!/usr/bin/env python
# This bounded queue is implemented as a doubly-linked list with an additional size
# parameter. This enables O(1) time efficiency for the enqueue and dequeue
# operations, as these operations only operate on the first and last nodes.
#
# This may not have optimal space efficiency because of the double pointers in
# each node, but it is a tradeoff for maximum time and throughput. The queue
# never examines nodes in the middle of the list, so it uses a minimal amount
# of memory throughput.
@wylieconlon
wylieconlon / gist:1286265
Created Oct 14, 2011
Canvas animation with requestAnimationFrame and mouse tracking for games
View gist:1286265
var Animator = (function() {
var container,
canvas, ctx,
w, h,
offsetLeft, offsetTop,
lastX, lastY;
var init = function(el, options) {
container = el;