Signing is signing data (i.e. gpg --sign the_file)
Certification is signing a key (i.e. gpg --sign-key the_key)
Authentication is signing a challenge (like ssh does). The Authentication stuff can be used to log in to a machine using your GPG key.
The signature math is the same however you do it. The key usage flags are just to classify things.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Downloads, compiles and installs qBittorrent. | |
# The qBittorrent version to download | |
version=$1 | |
# The libtorrent-rasterbar version to download | |
lt_version="1.1.11" | |
# ./configure arguments for qBittorrent | |
configure_args="--disable-gui" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <netdb.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <iostream> | |
#include <stdarg.h> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prepare a shell environment with help from a 1Password vault | |
# | |
# Prepares a shell environment by reading the `script` field from an item with | |
# the given NAME inside the `Environments` vault and then evaluating it in the | |
# current shell after injecting 1Password references. | |
# | |
# Usage: | |
# | |
# op-env <NAME> | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# This is a simple script that fetches the page from a given url and extracts a | |
# specific element using a CSS selector and compares it with the last invocation | |
# of this command with the same arguments. | |
# | |
# Some requests might not actually be HTML, but pup will parse it as HTML as if | |
# it had a body regardless, so one can still use the "body" css selector for | |
# non-html files. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… tons of calls | |
prlimit64(0, RLIMIT_AS, {rlim_cur=150000000, rlim_max=307200*1024}, NULL) = 0 | |
futex(0x7f5171126048, FUTEX_WAKE_PRIVATE, 2147483647) = 0 | |
statx(0, NULL, AT_STATX_SYNC_AS_STAT, STATX_ALL, NULL) = -1 EFAULT (Bad address) | |
statx(AT_FDCWD, ".", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=4096, ...}) = 0 | |
statx(AT_FDCWD, "servers", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=4096, ...}) = 0 | |
statx(AT_FDCWD, "servers", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=4096, ...}) = 0 | |
openat(AT_FDCWD, "servers", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3 | |
newfstatat(3, "", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_EMPTY_PATH) = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# This scripts generates and makes changes to `compile_commands.json` in order | |
# to make it work with coc-clangd without throwing a fit | |
import os | |
import json | |
import shlex | |
import subprocess | |
project_root = os.path.join(os.path.dirname(__file__), '..') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mk@… ~/Projects/Sandbox % cat digest-sha256-file-vs-system-sha256sum.rb | |
#!/usr/bin/env ruby | |
require 'tempfile' | |
require 'digest/sha2' | |
require 'benchmark/ips' | |
file = Tempfile.new 'testfile' | |
file.write 'a' * 1024 * 1024 * 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am mkroman on github. | |
* I am mkn (https://keybase.io/mkn) on keybase. | |
* I have a public key ASCrhe5_SFps_vD4R2FymT1GO4FaLiem42hHRIyuPtDFGgo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the oh-so-famous fish encryption for weechat. | |
# Copyright (C) 2010, Mikkel Kroman <mk@maero.dk> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
NewerOlder