Skip to content

Instantly share code, notes, and snippets.

View taktoa's full-sized avatar
🤔
Confused about why this feature exists

Remy Goldschmidt taktoa

🤔
Confused about why this feature exists
View GitHub Profile
@taktoa
taktoa / collapse.tex
Created November 10, 2017 16:51
Collapseable text box in LaTeX using OCG
% in the preamble:
\usepackage{ocgx}
% in the document:
\switchocg{ocgPlus ocgMinus ocg1}{%
\begin{ocg}{plus}{ocgPlus}{1}
{\bfseries +}
\end{ocg}
@taktoa
taktoa / seL4.nix
Last active November 9, 2017 07:17
seL4 Nix expression for Raspberry Pi 3 (may be broken!)
with rec {
pkgs = import <nixpkgs> {};
inherit (pkgs) stdenv gcc-arm-embedded libxml2 ncurses python27Packages;
inherit (pkgs) which fetchFromGitHub;
};
stdenv.mkDerivation rec {
name = "seL4";
src = fetchFromGitHub {
@taktoa
taktoa / bootstrap.nix
Last active November 8, 2017 22:52
Portably bootstrap nixpkgs without fetchTarball nonsense
{ system ? builtins.currentSystem }:
# In order to update `nixpkgs.json` to a specific revision, run:
#
# ```bash
# $ nix-prefetch-git https://github.com/NixOS/nixpkgs.git "${REVISION}" > nixpkgs.json
# ```
with rec {
builtin-paths = import <nix/config.nix>;
@taktoa
taktoa / Badges.hs
Created September 22, 2017 09:13
Hydra badge server, written in Haskell
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
module Main where
import Numeric (showHex)
@taktoa
taktoa / vim.nix
Created April 24, 2017 22:58 — forked from cleverca22/vim.nix
{config,pkgs,...}:
let
myVim = pkgs.vim_configurable.customize {
name = "vim";
vimrcConfig = {
customRC = ''
syntax on
set nu
set foldmethod=syntax
@taktoa
taktoa / Closure.hs
Last active April 19, 2017 20:09
A Haskell script that computes the transitive RPATH closure of a Nix store path.
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Prelude hiding (FilePath)
import Control.Foldl (list)
import Control.Arrow
@taktoa
taktoa / survive-java.md
Last active February 14, 2017 00:27
Haskellish tools for Java

Tools For Java That Make It More Like Haskell

  • [Checker Framework][checker]
    • FIXME: description
  • [Derive4J][derive4j]
    • FIXME: description
  • [hkt][hkt]
    • FIXME: description
  • [junit-quickcheck][junit-qc]
  • FIXME: description
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
@taktoa
taktoa / example-qdocindex-usage.bash
Last active January 3, 2017 12:32
Generate QDocIndex XML from a C++ project with the generateXML function defined in `generate-xml.bash`. Run `example-qdocindex-usage.bash` to see the output for qtbase with the given `index.qdocconf` (which currently needs to be modified for other C++ projects).
#!/usr/bin/env bash
# Download this gist to get index.qdocconf and generate-xml.bash
git clone https://gist.github.com/taktoa/2ee1253020d81341f7d4377771c418b7 gist
source ./gist/generate-xml.bash
move ./gist/index.qdocconf .
rmDir ./gist
# Make a folder called "qtbase" containing a source checkout of qtbase
export QT_VERSION="5.6.1-1"