Skip to content

Instantly share code, notes, and snippets.

View izolate's full-sized avatar

Yosh izolate

View GitHub Profile
@izolate
izolate / use-strong.md
Created February 23, 2016 09:11
JavaScript Strong Mode

Opt-in

  • "use strong"
  • --use-strong
  • implies strict mode

Scoping

  • 'var' is a syntax error
  • 'function' is lexically scoped everywhere
  • unbound variables are an early reference error
  • forward reference to anything but functions or classes is an early reference error
@izolate
izolate / keybase.md
Last active September 14, 2019 19:58
keybase prove github

Keybase proof

I hereby claim:

  • I am izolate on github.
  • I am izolate (https://keybase.io/izolate) on keybase.
  • I have a public key ASBEsv4wUE5goTR0Q7JuZaHPoFPfT_3zDGDIKJSI-_Mvjgo

To claim this, I am signing this object:

@izolate
izolate / pretty-numbers.js
Last active November 12, 2015 22:44
Pretty numbers
'use strict'
const suffixes = new Map()
suffixes.set(3, 'K')
suffixes.set(6, 'M')
suffixes.set(9, 'B')
suffixes.set(12, 'T')
// Figure out the appropriate scale for the number
const scale = (num) => {
@izolate
izolate / dream.lang
Last active July 17, 2018 13:28
Dream Language
# This is a single line comment
/*
This is a multi-line comment,
useful for when you have lots to say.
*/
# Arithmetic
5 + 5 # 10
5 - 5 # 0
@izolate
izolate / install-iojs-in-10s.sh
Last active September 15, 2015 02:05
Install io.js on Ubuntu in 10 seconds (no nvm)
IOJS_VERSION=v0.0.0
IOJS_DIR=$HOME/.iojs
iojs_install() {
iojs_setup
iojs_download
iojs_assemble
iojs_teardown
}
@izolate
izolate / clever-solution.py
Last active October 14, 2016 23:18
Calculate the average number of students per section
"""
Solution for Clever's job application.
Figuring out the average number of students per section.
"""
import requests
import json
class Clever:
def __init__(self, auth):
/**
* Requirements: Node.js, npm
* $ npm install request-json
*/
request = require('request-json');
var client = request.newClient('http://letsrevolutionizetesting.com');
var ids = [];
client.get('challenge', function(err, res, body) {