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 / etc_effort_base_01.conf
Last active February 20, 2021 12:57
Dvorak custom
# The baseline effort is based on the distance required
# to reach each key position. Assumed here is a standard 101-key
# layout and conventional finger placement. These distances are
# combined with other typing effort model parameters, such as
# key-finger assignment, finger penalties, hand penalties,
# and path stroke.
#
# The units of distance are arbitrary, but their relative values
# should correspond to actual key distances.
#!/bin/sh
# Set brightness values for each status.
# Range from 1 to 100 is valid
brightness_day=90
brightness_transition=70
brightness_night=50
# Set fps for smoooooth transition
fps=1000
#define _Addr int
#define _Int64 long long
#define _Reg int
#if __GNUC__ >= 3
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
From 382e3e0ed04f43351133fff3f1e6ad6655c6b4e3 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Sat, 9 May 2020 22:48:18 +0200
Subject: [PATCH] Don't prematurely fail during configure due to pkg-config
---
Cabal/Distribution/Simple/Configure.hs | 32 +++-----------------------
1 file changed, 3 insertions(+), 29 deletions(-)
diff --git a/Cabal/Distribution/Simple/Configure.hs b/Cabal/Distribution/Simple/Configure.hs
@hasufell
hasufell / Setup.hs
Last active May 9, 2020 15:10
Optional pkg-config detection with cabal
import Control.Exception ( SomeException
, handle
, try
)
import Control.Applicative
import Control.Monad
import Data.Char
import Data.List
import Data.Maybe
import Data.Monoid
From 3b6ff38dd26b8319a4d68d6998e6298857daeb6c Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Wed, 25 Mar 2020 23:11:55 +0100
Subject: [PATCH] Fix build with base >= 4.13
---
Codec/Compression/BZip/Stream.hsc | 8 ++++++++
bzlib.cabal | 4 ++--
2 files changed, 10 insertions(+), 2 deletions(-)
{
"GHC": {
"8.6.2": {
"viArch": {
"A_64": {
"Linux_Alpine": {
"unknown_version": {
"dlHash": "5be9f98c25c49dbfb65223e2642335d4a45220f0c4044c8af70bbcaebe688467",
"dlSubdir": "ghc-8.6.2",
"dlUri": "https://github.com/redneb/ghc-alt-libc/releases/download/ghc-8.6.2-musl/ghc-8.6.2-x86_64-unknown-linux-musl.tar.xz"
instance Lift Version where
lift (Version {..}) = [| Version {..} |]
instance Lift VUnit where
lift (Digits w) = [| Digits w |]
lift (Str t) = AppE <$> [| Str . T.pack |] <*> TH.lift (T.unpack t)
qq :: (Text -> Q Exp) -> QuasiQuoter
qq quoteExp' =
QuasiQuoter
#include <sys/types.h>
#include <dirent.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
int main() {
DIR *dir = opendir("/home");
if (readdir(dir) == NULL) {
printf("d is NULL");
@hasufell
hasufell / install.sh
Created January 24, 2020 20:55
Automatic installer for haskell applications
#!/bin/sh
set -eu
SCRIPT_DIR="$(CDPATH="" cd -- "$(dirname -- "$0")" && pwd -P)"
cd "${SCRIPT_DIR}"
# install ghcup
if ! [ -e "${SCRIPT_DIR}"/.ghcup/bin/ghcup ] ; then