Skip to content

Instantly share code, notes, and snippets.

View hasufell's full-sized avatar
👀
Staring

Julian Ospald hasufell

👀
Staring
View GitHub Profile
# Copyright 2017 Thomas Anderson <tanderson@caltech.edu>
# Distributed under the terms of the GNU General Public License v2
VPV="v${PV}"
require github [ user="${PN}" pn=client tag=${VPV} ]
require systemd-service [ systemd_files=[ ] systemd_user_files=[ packaging/linux/systemd/keybase.service ] ]
SUMMARY="Keybase CLI tool"
HOMEPAGE="https://keybase.io/"

Keybase proof

I hereby claim:

  • I am hasufell on github.

  • I am maerwald (https://keybase.io/maerwald) on keybase.

  • I have a public key ASD4nyaFvOcwo0fVoRlS-fAsqKt8jRjEYo9hH-heREmstQo

/**
* Returns a constant value. This will only
* be computed on the first render.
*/
export function useConst<T>(value: T | (() => T)): T {
const [state] = useState<T>(() =>
typeof value === "function" ? (value as Function)() : value
);
return state;
}
packages: .
source-repository-package
type: git
location: https://github.com/tel/saltine.git
tag: 8bc2a719806fbdce82c20e0a102255e296e325cf
# fmt-version=1
# tab separated columns
# tool | version | arch | supported-distros | url |
ghc 8.4.3 x86_64 |debian,{6,7,8}|gentoo|archlinux| <url-to-deb-tarball>
ghc 8.4.3 x86_64 |fedora|centos,{7}| <url-to-fedora-tarball>
ghc 8.4.3 i386 |debian,{6,7,8}| <url>
ghc 8.4.4 x86_64 |ubuntu|gentoo|archlinux| <url>
cabal 2.4.0.0 x86_64 |unknown| <url>

Nix sucks

Attempting to install NixOS

  1. installing NixOS, it fails to detect the UEFI partition on nixos-install, however installs, because that partition is obviously mounted, but doesn't record it in hardware-configuration.nix. Changing configuration after reboot seems to work, but the new configuration never shows up in the boot menu and is never booted. Silent failure, no error handling, wasted hours of debugging and rebooting.
  2. Trying to mix xfce4 with i3 fails, xfce session is never started. Fixing it requires special configuration and even changing the display manager, because the default has a hack to find sessions, which is broken, so you cannot choose "xfce+i3".
  3. Suspend and hibernate is broken.
  4. Setting up vim becomes a huge exercise in bug-hunting and configuration
    • First, vims default python is 2, breaking a lot of recent plugins. Setting it to 3 becomes a long quest in reading through ML posts and SO questions with odd configurations as answers. There is a wiki page about vim
@hasufell
hasufell / pre-commit.sh
Last active June 8, 2018 17:14
automate digest generation
#!/bin/bash
#
# Author: Julian Ospald <hasufell@posteo.de>
# Version: 0.0.1
# Date: 2018-06-08
# Reason: automate digest generation
#
# This pre-commit hook generates digests for all packages
# that have been changed and possibly adds the Manifests to the index.
#
{
"Enable": ["vet", "golint", "megacheck"],
"Vendor": true,
"Aggregate": true,
"Errors": true,
"Deadline": "600s",
"Linters": {
"vet": {
"Command": "go vet",
"PartitionStrategy": "packages"
@hasufell
hasufell / Lens.hs
Last active September 20, 2017 16:41
data Flag = Flag {
_flagName :: String
, _flagDep :: [Int]
}
-- If a flag with name 'fname' already exists in the input list,
-- add 'fdep' to it. Otherwise append a new Flag to the list with 'fdep'
-- being the only item.
addFlag :: [Flag] -> String -> Int -> [Flag]