Skip to content

Instantly share code, notes, and snippets.

@lemmi
lemmi / Makefile
Created May 12, 2015 16:21
issue with #define stderr (stderr) + openmp
all:
gcc -fopenmp -o main main.c
musl-gcc -fopenmp -o main-musl main.c
@lemmi
lemmi / make.log
Created July 26, 2015 23:30
catalyst-dkms
DKMS make.log for fglrx-15.20.1046_2 for kernel 4.1.3_1 (x86_64)
Mo 27. Jul 01:26:03 CEST 2015
AMD kernel module generator version 2.1
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make -C /lib/modules/4.1.3_1/build SUBDIRS=/var/lib/dkms/fglrx/15.20.1046_2/build/2.6.x modules
make[1]: Entering directory '/usr/src/kernel-headers-4.1.3_1'
CC [M] /var/lib/dkms/fglrx/15.20.1046_2/build/2.6.x/firegl_public.o
/var/lib/dkms/fglrx/15.20.1046_2/build/2.6.x/firegl_public.c:6448:12: warning: 'KCL_fpu_save_init' defined but not used [-Wunused-function]
static int KCL_fpu_save_init(struct task_struct *tsk)
==> kodi__do-fetch_00-distfiles.log
==> kodi__do-extract_00-distfiles.log
=> kodi-17.6_4: extracting distfile(s), please wait...

==> kodi__post-extract_00-patches.log
=> kodi-17.6_4: patching: add-missing-includes.patch.
=> kodi-17.6_4: patching: crossguid-0.2.patch.
=> xbps-src: updating repositories for host (x86_64-musl)...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/musl/x86_64-musl-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/musl/nonfree/x86_64-musl-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/musl/debug/x86_64-musl-repodata' ...
=> xbps-src: updating software in / masterdir...
=> xbps-src: cleaning up / masterdir...
=> ppp-2.4.7_11: removing autodeps, please wait...
=> ppp-2.4.7_11: building for x86_64-musl...
[target] libpcap-devel-1.9.1_1: found (https://alpha.de.repo.voidlinux.org/current/musl)
[target] libressl-devel-3.0.2_2: found (https://alpha.de.repo.voidlinux.org/current/musl)
#!/bin/sh
DEV=${1:-vxlan0}
handle_add() {
mac="${1:?}"
dev="${2:?}"
dst="${3:?}"
echo "bridge fdb append 00:00:00:00:00:00 dst $dst dev $dev"
@lemmi
lemmi / babel.svg
Created May 31, 2020 19:28
babeld-1.9.2 flamegraph
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lemmi
lemmi / dhcp.txt
Created May 31, 2020 20:08
ps -aux | grep dhcpcd
ps -aux | grep dhcpcd
_dhcpcd 660 0.0 0.0 2860 332 ? S Mai24 0:00 dhcpcd: [network proxy] wwww:xxxx:yyyy:zzzz:54a1:533f:bea8:dbd0
_dhcpcd 913 0.0 0.0 2860 416 ? S Mai30 0:00 dhcpcd: [network proxy] wwww:xxxx:yyyy:zzzz:c812:8870:709c:13c7
root 957 0.0 0.0 2860 2412 ? S Mai24 0:00 dhcpcd: [launcher]
root 992 0.0 0.0 2172 752 ? Ss Mai24 0:00 runsv dhcpcd-eth0
_dhcpcd 1030 0.0 0.0 2860 1840 ? S 10:36 0:00 dhcpcd: [network proxy] wwww:xxxx:yyyy:zzzz:a0a5:507e:ba4e:69a0
_dhcpcd 1040 0.0 0.0 2860 384 ? S Mai28 0:00 dhcpcd: [network proxy] wwww:xxxx:yyyy:zzzz:e5ba:3b01:ca93:9d9f
_dhcpcd 1047 0.0 0.0 2948 2192 ? S Mai24 0:08 dhcpcd: f3 [ip4] [ip6]
root 1048 0.0 0.0 2860 1728 ? S Mai24 0:02 dhcpcd: [privileged actioneer]
_dhcpcd 1049 0.0 0.0 2864 1540 ? S Mai24 0:02 dhcpcd: [network proxy]
@lemmi
lemmi / main.zig
Created July 4, 2020 15:56
swiss hash map in zig
const std = @import("std");
const math = std.math;
const assert = std.debug.assert;
const Allocator = std.mem.Allocator;
const testing = std.testing;
const Wyhash = std.hash.Wyhash;
const autoHash = std.hash.autoHash;
const meta = std.meta;
pub fn Map(comptime K: type, comptime V: type, comptime hash: fn (key: K) u32, comptime eql: fn (a: K, b: K) bool, comptime groupsize: u32) type {
@lemmi
lemmi / main.zig
Created July 6, 2020 08:49
zig 6.0 hashmap + smap benchmark
const std = @import("std");
const smap = @import("smap.zig");
const AutoHashMap = std.AutoHashMap;
const time = std.time;
fn step(x: u64) u64 {
if (x & 1 > 0) {
return 3 * x + 1;
} else {
return x / 2;
@lemmi
lemmi / main.zig
Created July 6, 2020 12:00
zig 0.6.0 hashmap + smap benchmark, no preallocation
const std = @import("std");
const smap = @import("smap.zig");
const AutoHashMap = std.AutoHashMap;
const time = std.time;
const Allocator = std.mem.Allocator;
const io = std.io;
fn step(x: u64) u64 {
if (x & 1 > 0) {
return 3 * x + 1;