Skip to content

Instantly share code, notes, and snippets.

@Thimoteus
Thimoteus / AssocList.purs
Created November 6, 2017 22:59
records as association lists
module AssocList where
import Data.List (List(..))
import Data.Record (delete, get)
import Data.Symbol (class IsSymbol, SProxy(..), reflectSymbol)
import Data.Tuple (Tuple(..))
import Type.Row (class RowLacks, class RowToList, Cons, Nil, RLProxy(RLProxy), kind RowList)
class RLToList
(rl :: RowList)
@Thimoteus
Thimoteus / Main.purs
Created December 25, 2015 09:57
the world's simplest incremental game
module Main where
import Prelude
import Data.Lens (LensP(), (+~), lens)
import Control.Monad.Aff (runAff, later, later')
import Control.Monad.Eff (Eff())
import Control.Monad.Eff.Exception (throwException)
import Control.Monad.Rec.Class (forever)
@Thimoteus
Thimoteus / settimeout.purs
Last active August 29, 2015 14:23
Synchronous setTimeout with Purescript and the ContT monad
module Main where
import Data.Function
import Debug.Trace
import Control.Monad.Trans
import Control.Monad.Cont.Trans
import Control.Monad.Eff
foreign import data Timeout :: !
type Milliseconds = Number
@Thimoteus
Thimoteus / lubuntu-rc.xml
Last active August 29, 2015 14:07
Modified lubuntu-rc.xml to update non-working commands
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
@Thimoteus
Thimoteus / Popcorn-Time-installer
Created May 15, 2014 11:47
Install Popcorn Time on Ubuntu
#!/bin/bash
##############
# PRELIMINARIES
##############
user=$(id -u)
INSTALL_PATH="$HOME/Popcorn-Time"
DESKTOP_PATH="$HOME/.local/share/applications"
ICON_PATH="$HOME/.local/share/icons/hicolor/256x256/apps"