Skip to content

Instantly share code, notes, and snippets.

View benley's full-sized avatar
🐈

Benjamin Staffin benley

🐈
View GitHub Profile

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 October 23, 2025 06:51
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 March 9, 2026 04:41 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active March 11, 2026 21:26
Hyperlinks in Terminal Emulators
@techhazard
techhazard / Readme.md
Last active November 6, 2017 12:39
Nixos with ZFS on encrypted LUKS as root filesystem
@AcouBass
AcouBass / python-packages.nix testing
Last active May 20, 2017 14:40
attempt at packaging sc-controller
sc-controller = buildPythonPackage {
name = "sc-controller";
version = "0.3.10";
src = pkgs.fetchFromGitHub {
owner = "kozec";
repo = "sc-controller";
rev = "v0.3.10";
sha256 = "0i4qg4ljnd1l1vq3n2i0q141qbfh733k0iyqcnpagh4w1glhhaa6";
};

Standardized Ladder of Functional Programming

The LambdaConf Ladder of Functional Programming (LOFP) is a standardized progression of different concepts and skills that developers must master on their journey to becoming expert-level functional programmers. LOFP can be used to rank workshops, talks, presentations, books, and courseware, so that aspiring functional programmers have a better understanding of what material is appropriate for them given their current experience.

Fire Keramik

Concepts

  • Immutable Data
  • Second-order Functions
@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active January 10, 2026 00:51
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

@quephird
quephird / Keyboard shortcuts.txt
Last active February 15, 2018 21:46
VERY IMPORTANT DOCUMENT! DO NOT ERASE!
bettyboop ꒰❛◑.◑❜꒱
blushh ꒰✿ᵕ‿ᵕ✿꒱
blusshh ꒰🔴ᵕ‿ᵕ🔴꒱
cryy ༼ ༎ຶ ෴ ༎ຶ༽
davidcaruso (•_•)( •_•)>⌐■-■ (⌐■_■)
derpp ◴_◶
drooll :Q____     |_____ |______
facepalmdouble (ლ̂‸ლ̂)
facepalmm (-‸ლ)
flipp (╯°□°)╯︵