This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Applicative | |
import Control.Monad | |
import Data.List | |
data Atom = P | Q | R | Top | |
deriving (Show, Eq, Enum) | |
type W = [Atom] | |
type C = [W] | |
type Upd m = m C -> m C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use glium::{self, Surface}; | |
use glium::backend::Context; | |
use glium::index::PrimitiveType; | |
use glium::texture::SrgbTexture2dArray; | |
use std::cell::{RefCell, RefMut}; | |
use std::default::Default; | |
use std::rc::Rc; | |
use std::ops::Range; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "OpenVPN server template", | |
"Mappings": { | |
"AWSRegion2AMI": { | |
"ap-northeast-1": { | |
"AMI": "ami-5ea72b5e" | |
}, | |
"ap-southeast-1": { | |
"AMI": "ami-365c5764" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% requires the booktabs package | |
\newcommand\semtower[2]{% a 2-level semantic tower | |
\begin{tabular}[c]{@{\,}c@{\,}} | |
\(#1\) | |
\\ | |
\midrule | |
\(#2\) | |
\\ | |
\end{tabular} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuxo pipefail | |
# Set up git | |
git init | |
gitignore haskell | |
echo '*.cabal' >> .gitignore | |
# Set up niv | |
niv init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install arch linux in an encrypted btrfs partition with GPT and UEFI support, gummiboot and hibernate/resume support | |
# sources: | |
# http://hole.tuziwo.info/install-arch-linux-on-uefi-gpt-computer-with-btrfs-support.html | |
# http://www.brunoparmentier.be/blog/how-to-install-arch-linux-on-an-encrypted-btrfs-partition.html | |
# https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption | |
# Take note of this: | |
# - The first thing you need is to identify which disk you're going to use. For the purpose of this guide, it will be /dev/sda | |
# Be VERY CAREFUL if you have more than one disk on your computer, and DOUBLE CAREFUL if one of them is the one with your backups | |
# - Since btrfs does not support swapfiles (yet), we'll create a swap partition. In this guide, it will NOT be encrypted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic Full-Disk Encrypted ZFS Thinkpad (w/ 512 sector SSD) booted from USB key | |
# EFI/BOOT: | |
# export BOOT=/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001011030101042-0\:0 | |
# parted --script $BOOT -- \ | |
# mklabel gpt \ | |
# mkpart esp fat32 1MiB 512MiB \ | |
# mkpart primary 512MiB 100% \ | |
# set 1 boot on | |
# mkfs.vfat -n BOOT $BOOT-part1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# language KindSignatures #-} | |
{-# language PolyKinds #-} | |
{-# language DataKinds #-} | |
{-# language TypeFamilies #-} | |
{-# language RankNTypes #-} | |
{-# language NoImplicitPrelude #-} | |
{-# language FlexibleContexts #-} | |
{-# language MultiParamTypeClasses #-} | |
{-# language GADTs #-} | |
{-# language ConstraintKinds #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MOVED HERE https://gist.github.com/dysinger/2a768db5b6e3b729ec898d7d4208add3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import colorsys | |
from colorz import colorz | |
WALLPAPER = '/home/james/.wallpaper' | |
COLORS = '/home/james/.colors' | |
XRESOURCES = '/home/james/.Xresources' | |
cols = '' | |
xres = """ |
OlderNewer