Skip to content

Instantly share code, notes, and snippets.

View kubkon's full-sized avatar

Jakub Konka kubkon

View GitHub Profile
@joachimschmidt557
joachimschmidt557 / behavior_tests.sh
Created February 5, 2022 23:24
Automatically enable passing behavior tests
#!/usr/bin/env bash
IFS=":"
rg --json "if \(builtin.zig_backend == .stage2_arm\) return error.SkipZigTest;" test/behavior/ | jq -r 'select(.type == "match") | "\(.data.path.text):\(.data.line_number)"' | while read -r file line; do
cp "$file" "$file.bak"
sed -i "$line s/^/\/\//" "$file"
if "$PWD/zig-out/bin/zig" test -target arm-linux-gnu test/behavior.zig; then
rm "$file.bak"
@fern9001
fern9001 / nixos-vim-guide.md
Last active February 9, 2024 18:13
Fern's NixOS Vim Guide

Fern's NixOS Vim Guide

A newbie friendly guide to configuring Vim in NixOS

File Structure

Create the following file struture in /etc/nixos

/etc/nixos
    |-- apps
        |-- vim
            |-- default.nix 
            |-- vimPlugins.nix
@ityonemo
ityonemo / test.md
Last active April 7, 2024 14:48
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

commit c74f64f05764f8bb25d85d8a88cc7c4647be60cc
Author: Frank Denis <github@pureftpd.org>
Date: Fri Oct 16 14:57:36 2020 +0200
Backport libxml2 fix from master
diff --git a/llvm/cmake/modules/GetLibraryName.cmake b/llvm/cmake/modules/GetLibraryName.cmake
new file mode 100644
index 00000000000..518fa4cf594
--- /dev/null
mkdir test
cd test
git clone -b wip/dueno/wasm-test https://github.com/ueno/enarx.git
git clone -b wip/dueno/wasm-test --recurse-submodules https://github.com/ueno/wasmtime.git
cd enarx
cargo make
./enarx-keep-sgx/target/debug/enarx-keep-sgx \
--shim enarx-keep-sgx-shim/target/x86_64-unknown-linux-musl/debug/enarx-keep-sgx-shim \
--code keep-runtime/target/x86_64-unknown-linux-musl/debug/keep-runtime
@rjhansen
rjhansen / keyservers.md
Last active April 14, 2024 12:28
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

@stek29
stek29 / prettyflags.py
Last active April 16, 2024 01:04
Pretty print x86 (r|e)flags register with lldb script
import lldb
import shlex
FLAGS = [
['CF', 'Carry Flag'],
[None, 'Reserved'],
['PF', 'Parity Flag'],
[None, 'Reserved'],
['AF', 'Adjust Flag'],
[None, 'Reserved'],
@jacquesbh
jacquesbh / Use Yubikey (GPG key) for SSH.md
Last active January 3, 2024 14:59
Use my Yubikey with GPG keys to SSH with a guest computer (OSX or Windows)
# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*