Skip to content

Instantly share code, notes, and snippets.

View rehno-lindeque's full-sized avatar

Rehno Lindeque rehno-lindeque

View GitHub Profile
@mietek
mietek / test.sh
Last active August 29, 2015 14:11
Cross-platform tests for Halcyon
#!/usr/bin/env bash
set -e
HALCYON_NO_SELF_UPDATE=1 \
source "${HALCYON_DIR}/src.sh"
test_ghc () {
local -a versions
@paf31
paf31 / 24days.md
Last active August 8, 2023 05:53
24 Days of PureScript

This blog post series has moved here.

You might also be interested in the 2016 version.

Give me back my sanity

One of the many things I do for my group at work is to take care of automating as many things as possible. It usually brings me a lot of satisfaction, mostly because I get a kick out of making people's lives easier.

But sometimes, maybe too often, I end up in drawn-out struggles with machines and programs. And sometimes, these struggles bring me to the edge of despair, so much so that I regularly consider living on a computer-less island growing vegetables for a living.

This is the story of how I had to install Pandoc in a CentOS 6 Docker container. But more generally, this is the story of how I think computing is inherently broken, how programmers (myself included) tend to think that their way is the way, how we're ultimately replicating what most of us think is wrong with society, building upon layers and layers of (best-case scenario) obscure and/or weak foundations.

*I would like to extend my gratitude to Google, StackOverflow, GitHub issues but mostly, the people who make the

@chrisdone
chrisdone / typing.md
Last active August 14, 2025 17:50
Typing Haskell in Haskell

Typing Haskell in Haskell

MARK P. JONES

Pacific Software Research Center

Department of Computer Science and Engineering

Oregon Graduate Institute of Science and Technology

@mietek
mietek / .bash_profile
Last active August 29, 2015 14:08
.bash_profile for Halcyon
export HALCYON_AWS_ACCESS_KEY_ID=...
export HALCYON_AWS_SECRET_ACCESS_KEY=...
export HALCYON_S3_BUCKET=...
if [[ ! -d ~/halcyon ]]; then
git clone https://github.com/mietek/halcyon.git ~/halcyon
fi
source <( ~/halcyon/halcyon paths )
@DamienCassou
DamienCassou / configuration.nix
Created October 22, 2014 13:41
configuration.nix file for NixOS on my macbook pro
{ config, pkgs, ... }:
let
hostname = "luz3";
in {
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# I use VirtualBox to connect to Windows and Linux guests
@axman6
axman6 / Import double.sublime-snippet
Last active August 29, 2015 14:07
Haskell double import snippet
<snippet>
<!--
Produces imports of the form:
import qualified Data.Foo as F
import Data.Foo (Foo, fun)
Foo and F in as and includes sections are determined by the last
name in the module string: Foo -> F and Foo, Data.Foo -> F and Foo
-->
@goodwillcoding
goodwillcoding / compile_patch.diff
Last active January 15, 2019 03:24
Patch to send compile to remote machine if Linux arch does match
diff --git a/nixops/backends/__init__.py b/nixops/backends/__init__.py
index 86ed0f4..c52e9d3 100644
--- a/nixops/backends/__init__.py
+++ b/nixops/backends/__init__.py
@@ -93,6 +93,17 @@ class MachineState(nixops.resources.ResourceState):
except nixops.ssh_util.SSHCommandFailed:
return None
+ def get_os_arch(self):
+ """Get the machine's OS archicture."""
@tel
tel / T.hs
Last active August 29, 2015 14:06
Transducers with explicit local state
{-# LANGUAGE GADTs, RankNTypes #-}
import Control.Applicative
import Control.Category
import Data.List (foldl')
import Data.Profunctor
import Prelude hiding ((.), id)
-- | Explicit state-passing Moore machine
data Moore i o where
@andyfriesen
andyfriesen / TestableIO.hs
Last active August 10, 2021 18:25
Tiny example showing how to force your Haskell code to be 100% deterministic under unit tests
{-# LANGUAGE FlexibleInstances #-}
module Main where
import Control.Applicative ((<$>))
import Control.Monad.State.Lazy as S
class Monad m => World m where
writeLine :: String -> m ()
instance World IO where