Skip to content

Instantly share code, notes, and snippets.

FROM alpine
# ---------------- #
# Installation #
# ---------------- #
# Install all prerequisites
RUN apk add --update --no-cache nginx nodejs nodejs-npm git curl wget gcc ca-certificates \
python-dev py-pip musl-dev libffi-dev cairo supervisor bash \
py-pyldap py-rrd &&\
@timaschew
timaschew / sample.json
Created July 25, 2017 15:19
for geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@timaschew
timaschew / gist:a7e478d24701bc88b564940859ca54c7
Created July 24, 2017 14:22
how to add new marker icons to geojson
https://github.com/mapbox/mapbox.js/blob/a74922bbd9577dfaaee46a3b961fc8dce434048f/src/marker.js#L22-L30
https://github.com/mapbox/geojson.io/blob/f172c30ffe631b7153a42adc78161a8686448eaf/leaflet/leaflet-src.js#L3270-L3272
const fs = require('fs')
function async1(callback) {
console.log('1')
setTimeout(function() {
console.log('2')
if (Math.random() > 0.5) {
return callback(new Error('boom'))
}
return callback(null, 'config.txt')
@timaschew
timaschew / fibonacci-1.scala
Created May 11, 2017 07:20
fibonacci in scala
def fibonacci (n: Int): Int = {
@tailrec
def fib (start: Int, prev: Int, prevPrev: Int = 0): Int = {
start match {
case start if (start == n) => prev
case _ => fib(start + 1, prev + prevPrev, prev)
}
}
n match {
case _ => fib(1, 1)
[warn] [FAILED ] com.artima.supersafe#supersafe_2.12.2;1.1.2!supersafe_2.12.2.jar(src): (0ms)
[warn] ==== local: tried
[warn] /Users/wilhelm/.ivy2/local/com.artima.supersafe/supersafe_2.12.2/1.1.2/srcs/supersafe_2.12.2-sources.jar
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/artima/supersafe/supersafe_2.12.2/1.1.2/supersafe_2.12.2-1.1.2-sources.jar
[warn] ==== Artima Maven Repository: tried
[warn] http://repo.artima.com/releases/com/artima/supersafe/supersafe_2.12.2/1.1.2/supersafe_2.12.2-1.1.2-sources.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
amdefine@>=0.0.4:
version "1.0.1"
resolved "https://artifactory.in.here.com/artifactory/api/npm/here-node/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
ansi-regex@^2.0.0:
version "2.1.1"
@timaschew
timaschew / source.js
Last active March 20, 2017 21:39
Calculates the story points on a trello board and replaces the list title (origin list title MUST NOT have whitespaces)
(function() {
function parsePoints(e) {
const text = $(e).find(".badge-text").text();
const tmp = text.split(' ');
if (tmp[0].trim().toLowerCase() === 'points:') {
return parseInt(tmp[1]);
}
return 0;
}
$(".js-list-content").each((i, board) => {
@timaschew
timaschew / install scripts
Last active February 9, 2017 08:17
rocketchat
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org curl graphicsmagick
{
"info2" : "no configuration explicitly specified -- making one",
"me" : "localhost:27017",
"info" : "Config now saved locally. Should come online in about a minute.",
"ok" : 1