Skip to content

Instantly share code, notes, and snippets.

@camshaft
camshaft / 1Gbe.json
Last active March 15, 2022 23:10
s2n-quic / native-tls
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"axes": [
{
"format": "%ss",
"formatType": "time",
"orient": "top",
"scale": "scale$x"
},
{
@camshaft
camshaft / configuration.nix
Last active April 21, 2016 02:23
nixos configuration
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
λ : make
Erlang/OTP 18 [erts-7.2.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
== Compilation error on file lib/api/http.ex ==
** (CompileError) lib/api/http.ex:38: undefined function generate/2
(stdlib) erl_eval.erl:669: :erl_eval.do_apply/6
make: *** [start] Error 1
@camshaft
camshaft / cases.ex
Last active February 1, 2016 19:15 — forked from mndvns/resource_cases.ex
defmodule Api.Resource.Cases do
use PoeApi.Resource
let service = Resource.param(:service)
let cases = apply(service, :get_all, [Input.get])
hyper do
action do
%{
@camshaft
camshaft / start.sh
Last active April 9, 2017 16:01
elixir startup script with graceful shutdown
#!/bin/bash
HOSTNAME="localhost"
PORT=${PORT-4000}
NODE="app_$PORT"
if [ -z "$COOKIE" ]
then
COOKIE=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
fi
@camshaft
camshaft / app.jade
Created February 19, 2015 02:01 — forked from mndvns/app.jade
import './index.ess'
import './app.ess'
// App
.App(class={extended: this.state.checked}).layout.layout-dir-vertical
h1 hi
<style>
.button-red {
color: red;
}
</style>
<div class="color">1</div>
<div class="color">2</div>
<div class="color">3</div>
<div class="color">4</div>
<div class="color">5</div>
<div class="color">6</div>
<div class="color">7</div>
<div class="color">8</div>
<div class="color">9</div>
<div class="color">10</div>
@camshaft
camshaft / experiment.js
Last active June 26, 2018 19:37
multiple google experiments
function choose(id, cb) {
var i = document.createElement('iframe');
i.setAttribute('sandbox', 'allow-scripts allow-same-origin');
document.body.appendChild(i);
var win = i.contentWindow.window;
win.loaded = function() {
cb(cxApi.chooseVariation());
};
var doc = win.document;
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title ng-bind="$root.title"></title>
<meta name="description" content="An interview tool">
<meta name="author" content="">
<noscript>