Skip to content

Instantly share code, notes, and snippets.

View benley's full-sized avatar
🐈

Benjamin Staffin benley

🐈
View GitHub Profile
@s1341
s1341 / freeipa-server.nix
Created May 29, 2023 04:08
working freeipa config
{
config,
lib,
...
}: let
cfg = config.services.freeipa-server;
in {
options.services.freeipa-server = {
enable = lib.mkEnableOption "freeipa service";
router = lib.mkOption {
@rummik
rummik / curl-gnutls-3.patch
Created March 15, 2020 23:00
Immersed VR NixOS package
--- a/lib/libcurl.vers.in 2020-03-12 05:33:59.367082951 +0000
+++ b/lib/libcurl.vers.in 2020-03-12 05:33:59.368082948 +0000
@@ -11,3 +11,8 @@
global: curl_*;
local: *;
};
+CURL_@CURL_LT_SHLIB_VERSIONED_FLAVOUR@3
+{
+ global: curl_*;
+ local: *;
@MatrixFrog
MatrixFrog / google-lgbt-issues.md
Last active May 1, 2020 01:16
anti-LGBT actions by Google and YouTube: A brief and probably incomplete history

I assembled this list from memory, and tried to fill in the details by skimming some the news articles I could find about each event. I'm sure there are things missing from this list, and facts I've gotten wrong, so please send corrections. You can DM me on Twitter or add comments on this gist. Eventually I'd like to expand this to include key quotes from Google leadership, and indications of how incidents were or weren't resolved, and maybe make it fancy and infographic-y like this one.

2008

Proposition 8, which ultimately took away the right to marry, from same-sex couples, is on the ballot in California. Despite the fact that Google officially opposed it, the "yes" campaign got special attention and assistance from the Google ads team. _I couldn't find much news coverage or official reporting on

@smoser
smoser / README.md
Last active July 4, 2024 15:28
qemu to linux mapping of smbios / dmi information

Mappings for DMI/SMBIOS to Linux and dmidecode

Information can be put into dmi tables via some qemu-system hosts (x86_64 and aarch64). That information is exposed in Linux under /sys/class/dmi/id and can be read with dmidecode. The names are very annoyingly inconsistent. The point of this doc is to map them.

Mappings

Example qemu cmdline:

qemu-system-x86_64 -smbios type=<type>,field=value[,...]

qemu-system-x86_64 -smbios type=0,vendor=superco,version=1.2.3
@ekimekim
ekimekim / jsonnet_lazy_proxy.py
Last active March 13, 2019 23:54
A very hacky way of creating a python object which lazily looks up keys of a jsonnet object as needed, without re-evaluating the entire jsonnet each time.
import collections
import json
import threading
from Queue import Queue
import _jsonnet as jsonnet
class LazyExecutor(threading.Thread):

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg
@edolstra
edolstra / nix-lang.md
Last active June 10, 2024 09:17
Nix language changes

This document contains some ideas for additions to the Nix language.

Motivation

The Nix package manager, Nixpkgs and NixOS currently have several problems:

  • Poor discoverability of package options. Package functions have function arguments like enableFoo, but there is no way for the Nix UI to discover them, let alone to provide programmatic ways to
@pjeby
pjeby / Keycloak Email Fetcher.md
Last active April 10, 2023 18:23
Keycloak JS Authenticator: Fetch emails from Github and Twitter APIs

Keycloak One-click Registration for Github and Twitter

Unlike Google and Facebook, Twitter and Github require extra steps to obtain a user's email address: extra steps that Keycloak doesn't do! Instead, Twitter and Github users must manually enter an email that then has to be verified.

This script fixes that problem. It's a Javascript Authenticator for Keycloak that can be placed as a required step at the beginning of a copy of the "first broker login" authentication flow -- which can then be set as the first broker flow for the Github and Twitter identity providers.

Then, when a user registers with Keycloak using one of these providers, this script invokes the right APIs to get the user's email. Twitter only has one email, so it returns that. For Github, it returns the account's primary email address, if it is verified and not a users.noreply.github.com address. If there is no primary, the first public verified address is returned. If there are no public verified addresses, the first verified a

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 5, 2024 21:01 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active July 4, 2024 01:11
Hyperlinks in Terminal Emulators