Skip to content

Instantly share code, notes, and snippets.

Avatar
👀
Staring

Julian Ospald hasufell

👀
Staring
View GitHub Profile
View keymap.json
{
"version": 1,
"notes": "",
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
"keyboard": "kinesis/stapelberg",
"keymap": "workman",
"layout": "LAYOUT",
"layers": [
[
"KC_ESC",
View etc_effort_base_01.conf
# 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.
View brightness.sh
#!/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
View alltypes.h
#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
View 0001-Don-t-prematurely-fail-during-configure-due-to-pkg-c.patch
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
Optional pkg-config detection with cabal
View Setup.hs
import Control.Exception ( SomeException
, handle
, try
)
import Control.Applicative
import Control.Monad
import Data.Char
import Data.List
import Data.Maybe
import Data.Monoid
View 0001-Fix-build-with-base-4.13.patch
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(-)
View ghcup-0.0.1.json
{
"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"
View QuasiQuoter.hs
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
View main.c
#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");