Skip to content

Instantly share code, notes, and snippets.

Beerend Lauwers beerendlauwers

Block or report user

Report or block beerendlauwers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
beerendlauwers / dohaskell-db-scraper.hs
Created Aug 15, 2016
Quick db scraper written by Mitchell Rosen to generate the YAML.
View dohaskell-db-scraper.hs
#!/usr/bin/env stack
-- stack --resolver lts-6.10 runghc --package sqlite-simple --package text --package time
{-# LANGUAGE OverloadedStrings #-}
import Control.Applicative
import Control.Monad
import Data.Monoid
import Data.Foldable
import Data.Maybe
beerendlauwers / test.js
Last active Sep 30, 2015
Attempt at loading extra CSS in StackEdit without replacing default.css
View test.js
// This doesn't seem to work. The browser only noticed the CSS file if it completely replaced <link type="text/css" rel="stylesheet" href="res-min/themes/default.css">.
// So, in a worst-case scenario, you can just copy that CSS file, add your changes to it, host it on Github and do the replacement with a UserCustom extension (
// Also tried onReady
$(document).ready( function() {
var loadCSS = function(href) {
var cssLink = $("<link rel='stylesheet' type='text/css' href='"+href+"'>");
beerendlauwers / stack.yaml
Created Aug 4, 2015
Support files for reddit issue
View stack.yaml
flags: {}
- '.'
- Win32-notify-
- reddit-
resolver: lts-2.13
View Data.hs
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
module Yesod.DataSource.Data where
import Yesod
import Data.Text (Text)
-- Subsites have foundations just like master sites.
beerendlauwers / gist:9f0492f90a0fadb361e5
Created Jan 13, 2015
Newtypes for richer type hinting of Matt Pryor's Lazy\Sequence library
View gist:9f0492f90a0fadb361e5
// Some newtypes that allow for richer type hinting in Matt Pryor's Lazy\Sequence library.
interface ArrayInterface extends Traversable {
class Finite implements IteratorAggregate, ArrayInterface {
View PHP 5.5 crash
class Test {
private $f = NULL;
public function addFunction( callable $f ) {
if ($this->f === NULL) {
$this->f = $f;
You can’t perform that action at this time.