Skip to content

Instantly share code, notes, and snippets.

View hasufell's full-sized avatar
👀
Staring

Julian Ospald hasufell

👀
Staring
View GitHub Profile
@hasufell
hasufell / quickcheck.hs
Last active August 29, 2015 14:11
from the haskell quickcheck library, code explained at https://www.youtube.com/watch?v=6COvD8oynmI (min 35-40)
quickCheck :: Testable a => a -> IO ()
class Testable a where
test :: a -> RandSupply -> Bool
class Arbitrary a where
arby :: RandSupply -> a
instance Testable Bool where
test b r = b
@hasufell
hasufell / 0001-Clean-up-configure.ac.patch
Created January 29, 2015 02:28
Fix compilation with '--as-needed' in IceGenerator-0.5.5-pre2
From 4d0868e2f0a6acd8f0cb1625b9012d094d0a9111 Mon Sep 17 00:00:00 2001
From: hasufell <hasufell@gentoo.org>
Date: Thu, 29 Jan 2015 03:24:24 +0100
Subject: [PATCH] Clean up configure.ac
* use foo_LIBS instead of hacking on LDFLAGS which also solves
problems with '--as-needed' linker flag
* convert to modern autotools standards
* remove some obsolete parts
---
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/ca-certificates/ca-certificates-20140927.3.17.2.ebuild,v 1.1 2014/10/16 17:48:39 vapier Exp $
# The Debian ca-certificates package merely takes the CA database as it exists
# in the nss package and repackages it for use by openssl.
#
# The issue with using the compiled debs directly is two fold:
# - they do not update frequently enough for us to rely on them
# - they pull the CA database from nss tip of tree rather than the release
module Grammar where
data Expr a = Plus (Expr a) (Term a)
| Minus (Expr a) (Term a)
| ExprTerm (Term a)
data Term a = Mult (Term a) (Factor a)
| Div (Term a) (Factor a)
| TermFactor (Factor a)
-- |This module provides 'findBugsInCommitMsg' to find
-- valid gentoo bug references in a commit message,
-- see <https://wiki.gentoo.org/wiki/Gentoo_git_workflow>.
module ParseBugs (
findBugsInCommitMsg
) where
import Control.Applicative ((<|>), (<$>), (<*>))
import Data.Attoparsec.Text (
Parser
#!/usr/bin/env python3
#
# Copyright (c) 2015, Julian Ospald <hasufell@posteo.de>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
@hasufell
hasufell / cave-resolve-ask.sh
Last active September 10, 2015 20:27
cave resolve --ask
cave-resolve() {
cave resolve --resume-file ~/cave_resume "$@"
local ret=$?
if [[ $ret == 0 ]] ; then
while true; do
echo -e '\n'
read -p "Do you wish to carry out these steps? [Y/n] " yn
case $yn in
[Yy]* ) cave resume --resume-file ~/cave_resume ; break;;
openra
Platform is Linux
Using Gl renderer
Desktop resolution: 1920x1200
No custom resolution provided, using desktop resolution
Using resolution: 1920x1200
Available mods:
cnc: C&C ({DEV_VERSION})
ra: Red Alert ({DEV_VERSION})
Loading mods: ra
@hasufell
hasufell / gist:2337601
Created April 8, 2012 14:32
spacefm buildlog
>>> Emerging (1 of 1) x11-misc/spacefm-9999 from hasufell-overlay
>>> Unpacking source...
GIT update -->
repository: git://github.com/IgnorantGuru/spacefm.git
at the commit: 049e1f5d4982e0853a6aeac8130a6e6b62d2a415
branch: master
storage directory: "/usr/portage/distfiles/egit-src/spacefm.git"
checkout type: bare repository
Cloning into /var/tmp/portage/x11-misc/spacefm-9999/work/spacefm-9999...
done.
 * Package: media-libs/devil-1.7.8-r1
 * Repository: hasufell-overlay
 * Maintainer: games@gentoo.org
 * USE: X amd64 elibc_glibc gif glut jpeg kernel_linux mng multilib nvtt opengl png sdl sse sse2 tiff userland_GNU
 * FEATURES: sandbox
>>> Unpacking source...
>>> Unpacking DevIL-1.7.8.tar.gz to /var/tmp/portage/media-libs/devil-1.7.8-r1/work
>>> Source unpacked in /var/tmp/portage/media-libs/devil-1.7.8-r1/work
>>> Preparing source in /var/tmp/portage/media-libs/devil-1.7.8-r1/work/devil-1.7.8 ...
* Applying devil-1.7.8-CVE-2009-3994.patch ...