Skip to content

Instantly share code, notes, and snippets.

View leinonen's full-sized avatar

Peter Leinonen leinonen

View GitHub Profile
const request = require('request')
const host = ''
const interval = 100
const president = 'That guy'
let voteCount = 0
let errorCount = 0
const handleResult = (err, res, body) => {
if (!err && res.statusCode === 200) {
const R = require('ramda')
const request = require('request')
const cheerio = require('cheerio')
const host = ''
const refreshInterval = 5000
const sortByScore = R.sortWith([R.descend(R.prop('score'))])
function getScores(data) {
const $ = cheerio.load(data)
let rawScores = $('#results').text().trim().split(' | ')
#ifdef GL_ES
precision mediump float;
#endif
uniform float time;
uniform vec2 resolution;
#define PI 3.1415926535898
#define EPS 0.01
const float clipFar = 100.0;
const float scaler = 1.0;
@leinonen
leinonen / tiny-raymarcher.frag
Created October 1, 2018 21:45
small raymarcher. nothing fancy
#ifdef GL_ES
precision mediump float;
#endif
uniform float time;
uniform vec2 resolution;
#define PI 3.1415926535898
#define EPS 0.01
const float clipFar = 16.0;