Skip to content

Instantly share code, notes, and snippets.

function swat {
# open browser window (--new-tab will only target the new window in a separate command)
firefox \
--new-window https://wikitech.wikimedia.org/wiki/Deployments
firefox \
--new-tab https://logstash.wikimedia.org/app/kibana#/dashboard/Fatal-Monitor \
--new-tab https://logstash.wikimedia.org/app/kibana#/dashboard/mediawiki-errors \
--new-tab https://logstash.wikimedia.org/app/kibana#/dashboard/mwdebug1002 \
--new-tab https://integration.wikimedia.org/zuul/ \
--new-tab https://tools.wmflabs.org/versions/
@alanpeabody
alanpeabody / my_app.ex
Last active July 18, 2024 05:22
Websockets in Elixir with Cowboy and Plug
defmodule MyApp do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
Plug.Adapters.Cowboy.child_spec(:http, MyApp.Router, [], [
dispatch: dispatch
])
<?php
// lambda calculus interpreter
//
// too bad PHP has no tail recursion, meaning it will run out of stack space
// and/or memory rather quickly.
//
// loosely based on Matt Might's:
//
// 7 lines of code, 3 minutes: Implement a programming language from scratch