In a terminal start a server.
$ python -m SimpleHTTPServer 8000
In another terminal set up the cgroups freezer.
In a terminal start a server.
$ python -m SimpleHTTPServer 8000
In another terminal set up the cgroups freezer.
module GADTMotivation | |
(* | |
Here is a simple motivational example for GADTs and their usefulness for library design and domain modeling. Suppose we | |
need to work with settings which can be displayed and adjusted in a GUI. The set of possible setting "types" is fixed | |
and known in advance: integers, strings and booleans (check-boxes). | |
The GUI should show an example value for each possible setting type, e.g. 1337 for an integer setting and "Hello" for a | |
string setting. How can we model this small domain of setting types and computing example values? | |
*) |
import json | |
import base64 | |
import os | |
# make sure the output directory exists before running! | |
folder = os.path.join(os.getcwd(), "imgs") | |
with open("scr.har", "r") as f: | |
har = json.loads(f.read()) |
#!/bin/bash | |
# | |
# This version uses September 2017 august stretch image, please use this image | |
# | |
if [ "$EUID" -ne 0 ] | |
then echo "Must be root" | |
exit | |
fi |
#!/bin/bash | |
# program-specific xbindkeys bindings | |
# there's a tool called `autokey`, which does this, but unlike xbindkeys, it doesn't catch mouse buttons | |
# doesn't interfere with main xbindkeys | |
# `pacman -S xbindkeys xdotool` | |
# `sleep 3 && cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm` |
#!/bin/sh | |
# Written by: Keefer Rourke <https://krourke.org> | |
# Based on AUR package <https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ttf-google-fonts-git> | |
# dependancies: fonts-cantarell, ttf-ubuntu-font-family, git | |
sudo apt-get install fonts-cantarell ttf-ubuntu-font-family git | |
srcdir="/tmp/google-fonts" | |
pkgdir="/usr/share/fonts/truetype/google-fonts" | |
giturl="git://github.com/google/fonts.git" |
[SECTION .text] | |
global _start | |
_start: | |
jmp short getData | |
execIt: | |
pop ebx ;Get the string off stack | |
xor eax,eax ;Clear eax | |
mov [ebx+8],al ;This helps us to avoid having a zero byte in our code. | |
;It sets the terminator to the string. | |
push eax ;Second argument for WinExec |
""" A python 2D vector class based on complex numbers | |
""" | |
import cmath | |
class Vector(complex): | |
@classmethod | |
def fromPolar(cls, r, phi): | |
return cls(cmath.rect(r, phi)) |
This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt
.
As it is not possible to change the ports used for the standalone
authenticator and I already have a nginx running on port 80/443, I opted to use the webroot
method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com
and example.com
).
For this, I placed config files into etc/letsencrypt/configs
, named after <domain>.conf
. The files are simple: