Skip to content

Instantly share code, notes, and snippets.

View Tehnix's full-sized avatar
🌞
Enjoying the code...

Christian Kjær Tehnix

🌞
Enjoying the code...
View GitHub Profile
module ProductEncode where
import CLaSH.Prelude
import CLaSH.Bit
import CLaSH.Sized.Vector
n :: Unsigned 9
n = 7
k :: Unsigned 9
@Tehnix
Tehnix / Assignment.tex
Created April 29, 2014 19:11
Base skeleton for a new LaTeX document using https://gist.github.com/Tehnix/11409130 as the document class
\documentclass[12pt]{rapport}
% Relevant for frontpage and headers
\course{Course Number: Course Title}
\title{Assignment Title}
\author{Name}
\date{22/10 2014}
\begin{document}
\maketitle
@Tehnix
Tehnix / rapport.cls
Created April 29, 2014 19:09
Document class for well formatted LaTeX with an optional DTU frontpage
\ProvidesClass{rapport}
\LoadClass[12pt,a4paper]{article}
% packages that are regularly used
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{ulem}
\usepackage{tikz}
\usepackage[utf8]{inputenc}
@Tehnix
Tehnix / style.tex
Created April 29, 2014 19:07
styled code
\usepackage{xcolor}
\definecolor{lightlightgray}{gray}{0.95} % background
\definecolor{shred}{rgb}{0.6,0,0} % for strings
\definecolor{shgreen}{rgb}{153, 153, 136} % comments
\definecolor{shpurple}{rgb}{0.5,0,0.35} % keywords
\lstset{
breaklines=true,
xleftmargin=25pt,
#!/user/bin/env python3.4
import socket
HOST = 'irc.codetalk.io'
PORT = 6667
NICK = 'pybot-test'
CHAN = '#lobby-test'
$if null articles
<div .font-box>
<p #no-articles> There are no articles yet :(...
$else
<div #articles-sidebar>
<div #articles-sidebar-item-bottom>
<div .arrow-down>
$forall (Entity articleId article, Entity _ _) <- articles
^{blogArticle articleId article False}
@Tehnix
Tehnix / styles.less
Created February 28, 2014 16:03
My Atom Theme
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
@Tehnix
Tehnix / style.less
Created February 27, 2014 20:40
Cleaner Atom UI
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
@Tehnix
Tehnix / Puppet TO-DO.md
Last active August 29, 2015 13:56
List of things that puppet should when setting up my server
  • Setup users
    • Root
    • Tehnix
  • Setup IRC
    • With SSL
    • Move MOTD into place after it's set up
  • Setup IRC Services
  • Setup Keter
  • Setup Angel
  • Mount with sshfs
@Tehnix
Tehnix / API.hs
Last active August 29, 2015 13:55
API handler
{-# LANGUAGE TupleSections, OverloadedStrings, DeriveGeneric #-}
module Handler.Admin.API where
import Import
import API.CloudFlare
import API.Disqus
data CloudFlareResponseJson = CloudFlareResponseJson Bool (Either Text CloudFlareTrafficBreakdown) deriving (Show)