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
SVG=$(patsubst graphics/%.svg, graphics/%.eps, $(wildcard graphics/*.svg)) | |
XCF=$(patsubst graphics/%.xcf, graphics/%.eps, $(wildcard graphics/*.xcf)) | |
all: presentation | |
presentation: graphics | |
latex slides.tex | |
latex slides.tex | |
dvips slides.dvi | |
ps2pdf slides.ps |
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
#!/bin/bash | |
sudo vpnc --gateway vpn.rwth-aachen.de --id FullTunnel --username ab123456 |
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
\setbeamertemplate{footline}{ | |
\leavevmode% | |
\hbox{% | |
\begin{beamercolorbox}[wd=.4\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}% | |
\usebeamerfont{author in head/foot}\insertshortauthor | |
\end{beamercolorbox}% | |
\begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}% | |
\usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em} | |
\insertframenumber{} \hspace*{1ex} | |
\end{beamercolorbox}}% |
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
# Taken from https://github.com/HIPERFIT/L0Language/blob/master/git-hooks/pre-commit | |
fail() { | |
echo "Aborting commit due to verification errors." | |
echo "If you disagree, use git commit --no-verify." | |
exit 1 | |
} | |
hlintable() { | |
! egrep -q '{-# LANGUAGE.*QuasiQuotes' $1 |
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
sum $ map (\(a,b) -> a*b `mod` 103) $ map (\(a,b) -> ((256^(7-a)) `mod` 103,b)) $ zip [1..] $ map (`mod` 103) $ map ord "string" |
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 python3 | |
# -*- coding: utf-8 -*- | |
start = 0x0001F300 | |
while start < 0x1F58E: | |
print(hex(start), chr(start)) | |
start+=1 |
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 python3 | |
# -*- coding: utf-8 -*- | |
import itertools | |
def gen(i): | |
while True: | |
yield i | |
i = i + 1 | |
def primes(gen): |
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 python3.3 | |
# -*- coding: utf-8 -*- | |
import time | |
def interrupt_decorator(handler): | |
def decorator(fun): | |
def wrapper(*args, **kwargs): | |
try: | |
fun(*args, **kwargs) |
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 TypeFamilies #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
import Control.Applicative | |
import Control.Monad.Trans.Resource | |
import Control.Monad.IO.Class | |
import qualified Data.ByteString.Char8 as BSC | |
import Data.Conduit | |
import qualified Data.Conduit.Combinators as C | |
import qualified Data.Conduit.List as CL |
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
problem4 :: [Int] -> Int | |
problem4 = read . foldl1 (++) . map show . sortBy f | |
f:: Int -> Int -> Ordering | |
f x y | v1 == v2 = EQ | |
| v1 < v2 = GT | |
| v1 > v2 = LT | |
where | |
v1 = concatInt x y | |
v2 = concatInt y x |
OlderNewer