Skip to content

Instantly share code, notes, and snippets.

View julianpistorius's full-sized avatar

Julian Pistorius julianpistorius

View GitHub Profile
@cboettig
cboettig / Caddyfile
Created December 31, 2015 18:41
Caddyserver proxy for Jupyter
https://example.com {
proxy / jupyter:8888 {
proxy_header X-Real-IP {remote}
proxy_header Host {host}
}
proxy {{.PathMatches "~* /(api/kernels/[^/]+/(channels|iopub|shell|stdin)|terminals/websocket)/?"}} jupyter:8888 {
proxy_header X-Real-IP {remote}
@marick
marick / about_those_lava_lamps.md
Last active June 22, 2022 21:08
About Those Lava Lamps

Around 2006-2007, it was a bit of a fashion to hook lava lamps up to the build server. Normally, the green lava lamp would be on, but if the build failed, it would turn off and the red lava lamp would turn on.

By coincidence, I've actually met, about that time, (probably) the first person to hook up a lava lamp to a build server. It was Alberto Savoia, who'd founded a testing tools company (that did some very interesting things around generative testing that have basically never been noticed). Alberto had noticed that people did not react with any urgency when the build broke. They'd check in broken code and go off to something else, only reacting to the breakage they'd caused when some other programmer pulled the change and had problems.

@bahamas10
bahamas10 / 0-README.md
Last active January 4, 2019 18:02
Joyent Manta Functions
from multiprocessing import Pool
from subprocess import call, Popen, PIPE
from glob import glob
from datetime import datetime
import logging
import argparse
import json
from functools import partial
logging.basicConfig(level=logging.INFO,
var active = false;
function changeRefer(details) {
if (!active) return;
for (var i = 0; i < details.requestHeaders.length; ++i) {
if (details.requestHeaders[i].name === 'Referer') {
details.requestHeaders[i].value = 'http://www.google.com/';
break;
}
anonymous
anonymous / setup_osx_vm_config.sh
Created February 11, 2015 18:34
echo Setting OSX values for Virtual Box ${1}
VBoxManage modifyvm "${1}" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff
VBoxManage setextradata "${1}" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"
VBoxManage setextradata "${1}" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "${1}" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "${1}" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "${1}" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
@prakhar1989
prakhar1989 / richhickey.md
Last active November 8, 2023 17:19 — forked from stijlist/gist:bb932fb93e22fe6260b2
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

@Zulko
Zulko / 3D_piano_from_midi.py
Last active April 9, 2024 05:51
Turn a piano MIDI file into a basic 3D animated piano video.
"""
Turn a piano MIDI file into a basic 3D animated piano video.
See the result here:
I am leaving it as a script because it is not tested on enough MIDI files yet.
Zulko 2014
This script is released under a Public Domain (Creative Commons 0) licence.
curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: localhost:3001/ws" -H "Sec-Websocket-Key: hey" -H "Sec-Websocket-Version: 13" http://localhost:3001/ws
@evancz
evancz / Architecture.md
Last active December 21, 2022 14:28
Ideas and guidelines for architecting larger applications in Elm to be modular and extensible

Architecture in Elm

This document is a collection of concepts and strategies to make large Elm projects modular and extensible.

We will start by thinking about the structure of signals in our program. Broadly speaking, your application state should live in one big foldp. You will probably merge a bunch of input signals into a single stream of updates. This sounds a bit crazy at first, but it is in the same ballpark as Om or Facebook's Flux. There are a couple major benefits to having a centralized home for your application state:

  1. There is a single source of truth. Traditional approaches force you to write a decent amount of custom and error prone code to synchronize state between many different stateful components. (The state of this widget needs to be synced with the application state, which needs to be synced with some other widget, etc.) By placing all of your state in one location, you eliminate an entire class of bugs in which two components get into inconsistent states. We also think yo