Skip to content

Instantly share code, notes, and snippets.

@boxdot
boxdot / cli.elm
Last active July 24, 2018 20:47
Minimal console app in Elm
module Cli where
port output : String
port output =
"Sub-orbital table 8-bit realism boat soul-delay face forwards industrial
grade drone. Cartel towards footage tube assault table woman stimulate bridge
claymore mine semiotics human. Post-construct j-pop military-grade stimulate
narrative realism. Shoes convenience store sunglasses realism numinous tanto
long-chain hydrocarbons. Franchise tower render-farm girl wonton soup sprawl
fetishism Kowloon advert semiotics shoes dolphin drugs otaku marketing.
@boxdot
boxdot / template.html
Last active September 28, 2015 09:27
<div class="entry">
<h1>Hello {{title}}!</h1>
<div class="body">
{{body}}
</div>
</div>
<!--
view title body =
div
@boxdot
boxdot / article.html
Last active October 20, 2015 13:56
Simple one page layout
<!DOCTYPE html>
<meta charset="utf-8">
<title>partlog</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.4/semantic.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/tomorrow-night-eighties.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<style type="text/css">
def parse(line, data):
incom, outName = line.split(" -> ")
tokens = incom.split(" ")
if len(tokens) == 1:
try:
val = int(tokens[0])
data[outName] = val
except Exception:
data[outName] = tokens[0]
elif len(tokens) == 2:
def parse(line, data):
incom, outName = line.split(" -> ")
tokens = incom.split(" ")
if len(tokens) == 1:
try:
val = int(tokens[0])
data[outName] = val
except Exception:
data[outName] = tokens[0]
elif len(tokens) == 2:
#include <iostream>
template<int N>
struct A {
struct B {
B(int x) : x(x) {}
int x;
};
};
@boxdot
boxdot / mess_hello_world.py
Created December 28, 2015 18:08
Run a single task on mesos
#!/usr/bin/env python
import logging
import uuid
import time
import sys
import mesos.interface
from mesos.interface import mesos_pb2
import mesos.native
@boxdot
boxdot / arte-tacks-url.py
Last active January 10, 2016 12:24
Print the url for the recent Arte Tracks show.
#!/usr/bin/env python
"""Fetch the url of the recent arte tracks show."""
import re
import sys
import urllib
import requests
# Visit main page of Arte Tacks
resp = requests.get('http://tracks.arte.tv/de/die-sendung')
#include <array>
#include <iostream>
#include <stdio.h>
#include <chrono>
enum class Ax { X = 0, Y = 1, Z = 2 };
static constexpr std::array<Ax, 3> AXES = {Ax::X, Ax::Y, Ax::Z};
static constexpr auto COUNT = 200000000;
@boxdot
boxdot / Makefile
Last active March 31, 2016 07:24
Use `make` to maintain dependencies.
.PHONY: all
all: vendor/.last-build
include deps.mk