Skip to content

Instantly share code, notes, and snippets.

Part 1: Installing MSYS2/MinGW-W64
Windows is a piece of shit so to make the projects and code interoperable between Windows and Linux
development environments we need to setup a Linux compatible build environment on Windows.
1. Go to http://msys2.github.io/
2. Follow instructions 1 - 6 on the page. Make sure you remember where you installed this!
NB: For instruction 6 it asks you to close MSYS2, do this by pressing the X button, not
by typing exit (which is how you would normally do it).
3. Type the following command into the MSYS2 shell:
@lux01
lux01 / Puzzle.hs
Last active August 29, 2015 14:21
That Weird Snake Arithmetic Thing
module Main (main) where
import Data.List (permutations)
import Control.Monad (forM_)
gridValue :: [Float] -> Float
gridValue xs = ((((((a + 13)*b)/c)+d + 12) * e) - f - 11 + g) * h / i
where a = xs !! 0
b = xs !! 1
c = xs !! 2
@lux01
lux01 / robber.hs
Created May 1, 2015 13:08
Daily Programmer #212 Easy
-- Implementation of Reddit /r/DailyProgrammer challenge #212 [Easy]
-- Rövarspråket
import Data.Char (isUpper, toLower)
type Consonants = [Char]
robberEncode :: Consonants -> String -> String
robberEncode cons = concat . map mapper
where mapper :: Char -> String
@lux01
lux01 / epslatex.ps1
Created September 5, 2012 10:20
A Windows PowerShell script to ease the process of generating LaTeX enabled gnuplot graphs. See http://luxlooks.wordpress.com/epslatex-script/ for more information.
foreach( $i in $args ) {
$figurename = $i
}
$fontface = "times"
$fontsize = "scriptsize"
$outputname = "c$figurename"
$outputtex = "c$figurename.tex"
gnuplot "$figurename"