Skip to content

Instantly share code, notes, and snippets.

View davidak's full-sized avatar
🔥
burnt-out

davidak

🔥
burnt-out
View GitHub Profile
@davidak
davidak / gist:b06c89d81266fecc159a13dd3d0b67b1
Created March 27, 2021 02:35
Half-Life crash on bcachefs (even with inodes_32bit)
Could not connect to X session manager: None of the authentication protocols specified are supported
Could not connect to X session manager: None of the authentication protocols specified are supported
GameAction [AppID 70, ActionID 19] : LaunchApp changed task to ProcessingInstallScript with ""
GameAction [AppID 70, ActionID 19] : LaunchApp changed task to SynchronizingCloud with ""
GameAction [AppID 70, ActionID 19] : LaunchApp changed task to SiteLicenseSeatCheckout with ""
GameAction [AppID 70, ActionID 19] : LaunchApp changed task to CreatingProcess with ""
GameAction [AppID 70, ActionID 19] : LaunchApp waiting for user response to CreatingProcess ""
GameAction [AppID 70, ActionID 19] : LaunchApp continues with user response "CreatingProcess"
Opted-in Controller Mask for AppId 70: 0
Game update: AppID 70 "", ProcID 2678, IP 0.0.0.0:0
@davidak
davidak / gist:781900fc70a9c04ba21ca3c356024caf
Created September 2, 2020 15:21
80,000 IPs from 10.1.0.0 to 10.2.56.128
This file has been truncated, but you can view the full file.
{ address = "10.1.0.0"; prefixLength = 8; }
{ address = "10.1.0.1"; prefixLength = 8; }
{ address = "10.1.0.2"; prefixLength = 8; }
{ address = "10.1.0.3"; prefixLength = 8; }
{ address = "10.1.0.4"; prefixLength = 8; }
{ address = "10.1.0.5"; prefixLength = 8; }
{ address = "10.1.0.6"; prefixLength = 8; }
{ address = "10.1.0.7"; prefixLength = 8; }
{ address = "10.1.0.8"; prefixLength = 8; }
{ address = "10.1.0.9"; prefixLength = 8; }
@davidak
davidak / gist:171f81f945f36d7fd88dce4e67af8a5d
Created March 21, 2020 08:33
Use older package version with Nix
This works with the package manager [Nix](https://nixos.org/nix/), available on NixOS and working on most linux distros and macOS (theoretically also BSD and Windows).
1. search for package definition on GitHub, for example ansible
https://github.com/NixOS/nixpkgs/search?p=1&q=ansible&unscoped_q=ansible
it is here https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/admin/ansible/default.nix
2. search the history for the last commit with your preferred version, for example 2.5
@davidak
davidak / gist:54c8222e63b229a30574d6e0a1263125
Created December 2, 2019 19:31
nixpkgs versions with - and _
[davidak@ethmoid:~/code/nixpkgs]$ egrep -R '*version ?= ?"[0-9.]*[_-]+[0-9.]*";$'
Binary file .git/objects/pack/pack-7c34066f06560251dbd78f6d525b986cdb106e8b.pack matches
nixos/modules/hardware/raid/hpsa.nix: version = "2.40-13.0";
pkgs/tools/networking/airfield/node-packages.nix: version = "2.1.0-0";
pkgs/tools/typesetting/tex/texlive/pkgs.nix: version = "1.-";
pkgs/tools/typesetting/tex/texlive/pkgs.nix: version = "1.8.6-2";
pkgs/tools/inputmethods/ibus/default.nix: version = "31.90.0_1";
pkgs/tools/archivers/xarchive/default.nix: version = "0.2.8-6";
pkgs/tools/system/inxi/default.nix: version = "3.0.37-1";
pkgs/tools/system/hardlink/default.nix: version = "1.3-4";
Name Year started total packages maintainers pkg per maintainer up-to-date
Nixpkgs 2003 48703 1173 42 85.00%
Debian 1994 29977 3698 8 70.20%
FreeBSD Ports 1994 26914 1670 16 74.80%
Red Hat 1997 22240 #DIV/0! 74.10%
Gentoo 2002 18819 566 33 64.10%
pkgsrc 1997 14600 459 32 62.70%
openSUSE 1997 12199 ? #VALUE! 71.80%
MacPorts 2002 10990 356 31 60.20%
{ config, lib, pkgs, ... }:
{ #boot.isContainer = true;
networking.useDHCP = lib.mkForce true;
networking.firewall.enable = false;
services = {
openssh.enable = true;
dnsmasq.enable = true;
nginx.enable = true;
@davidak
davidak / trolling_haskell
Created May 7, 2019 18:29 — forked from quchen/trolling_haskell
Trolling #haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now

Execution time in seconds

original list with 11 items

jpp: 0.038900841027498245
Laurent H.: 0.09572448302060366
Kevin: 0.007683080970309675
davidak: 0.027118309983052313

list with 100 items

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import random as r
# https://pyzufall.readthedocs.io/
from pyzufall.generator import verbt, objekt
for i in range(1, 100):
s = objekt()

Keybase proof

I hereby claim:

  • I am davidak on github.
  • I am davidak (https://keybase.io/davidak) on keybase.
  • I have a public key whose fingerprint is 8CF1 774E 62AA 8FFF 3A61 C57D B683 9887 B601 97B0

To claim this, I am signing this object: