Skip to content

Instantly share code, notes, and snippets.

View bitonic's full-sized avatar
🍥
bottomless pit

Francesco Mazzoli bitonic

🍥
bottomless pit
View GitHub Profile
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- PC-BSD - Fonts configurations v.12012006-->
<!-- Antialias any font by default with autohint enabled, hintfull -->
<match target="font" >
<edit mode="assign" name="antialias" >
{-# OPTIONS_GHC -F -pgmFtrhsx #-}
module Main (main) where
import Control.Monad
import Happstack.Server
import qualified Text.Blaze.Html5 as H
import Data.String (fromString)
@bitonic
bitonic / cout.hs
Created November 1, 2011 19:23
cout in Haskell
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, IncoherentInstances #-}
class Cout a r where
(<<) :: IO String -> a -> IO r
instance Cout [Char] [Char] where
lm << x = fmap (++ x) lm
instance Cout [Char] () where
lm << x = lm >>= putStr . (++ x)
@bitonic
bitonic / AgdaBasics.agda
Created February 7, 2012 09:28
Agda tutorial
module AgdaBasics where
apply : (A : Set)(B : A → Set) → ((x : A) → B x) → (a : A) → B a
apply A B f a = f a
_∘_ : {A : Set}{B : A → Set}{C : (x : A) → B x → Set}
(f : {x : A}(y : B x) → C x y)(g : (x : A) → B x)
(x : A) → C x (g x)
(f ∘ g) x = f (g x)
{-# LANGUAGE StandaloneDeriving, FlexibleContexts, UndecidableInstances #-}
-- Laungh ghci with -fobject-code to make the Fix/Tree trick work (thanks edwardk).
-- courtesy of hpc on #haskell
import Unsafe.Coerce
import Control.Monad.ST
toInteger :: Int -> Integer
isJust :: Maybe a -> Bool
null :: [a] -> Bool
@bitonic
bitonic / francesco.el
Created June 22, 2012 12:58
My emacs config
;;; ===========================================================================
;;; Francesco's emacs config, <f@mazzo.li>
;;; Packages needed: paredit-el, wl-beta, auto-complete-el, haskell-mode,
;;; erlang-mode, w3m-el, bbdb, slime, elib, cscope-el
;;; Non-debian packages: distel, undo-tree, highlight-parentheses, agda2,
;;; sicstus, ghc-mod
;;; Additional dirs
(add-to-list 'load-path "~/.emacs.d/site-lisp/distel")
(add-to-list 'load-path "~/.emacs.d/site-lisp/sicstus")
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
module Everywhere where
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Data.Subst where
@bitonic
bitonic / circe-color-nicks-f.el
Created November 8, 2014 15:18
circe colors
;;; circe-color-nicks-f.el --- Color nicks in the channel
;; Copyright (C) 2012 Taylan Ulrich Bayırlı/Kammer
;; Author: Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;; This file is part of Circe.
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;;; circe-color-nicks-f.el --- Color nicks in the channel
;; Copyright (C) 2012 Taylan Ulrich Bayırlı/Kammer
;; Author: Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;; This file is part of Circe.
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License