This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {ratio} from 'fuzzball'; | |
import data from './data.js'; | |
const currencyThresholds = { | |
USD: 50, | |
EUR: 40, | |
GBP: 35, | |
JPY: 5000, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
if [ `getconf LONG_BIT` != 64 ]; then | |
exit 1 | |
fi | |
sudo apt-get -y update | |
sudo apt-get -y install lxc wget bsdtar iptables curl golang git aufs-tools mercurial libdevmapper-dev | |
export GOPATH=~/usr/lib/go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://youtu.be/XEt09iK8IXs?t=1258 | |
let t = 0; // try counter | |
const s = 10; // search space size | |
let r = Math.floor(Math.random() * s); // rabbit | |
// Take a guess. | |
const guess = g => { | |
t += 1; | |
console.log('Try', t, 'in', g, 'rabbit in', r); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf -*- | |
import urllib2, json, datetime, os, unicodedata, re, codecs | |
from threading import Thread | |
API_KEY = '#' | |
WIKI = '#' | |
def slugify(value): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export SYSTEM_SECRET=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
echo "SYSTEM_SECRET is $SYSTEM_SECRET" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/node_modules | |
*.log | |
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Don't forget the imports. | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
const JSON_URL = "https://api.example.io/comments.json"; | |
class Store { | |
constructor(data) { | |
this.data = data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/node_modules | |
*.log | |
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/node_modules | |
*.log | |
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env coffee | |
http = require 'http' | |
# Which mine? | |
mine = 'http://beta.flymine.org/beta' | |
# Replace multiple whitespace with a single space. | |
clean = (text) -> text.replace(/\s+/g, ' ') | |
# Get the services listing. |
NewerOlder