Skip to content

Instantly share code, notes, and snippets.

@erny
erny / renderers.py
Last active December 18, 2023 09:14
FastAPI Simple content negotiation
"""Simple content negotiation
Usage:
Example 1:
from renderers import render
@router.post("/myapp/items/")
async def api_login(item: Item, accept: Optional[str] = Header(default='application/jwt')):
@troyfontaine
troyfontaine / README.md
Last active August 7, 2020 12:56
Yubikey for AWS-Vault

How to Set up Yubikey for AWS-Vault

Tired of using a password for aws-vault? Want to use that lovely touch pad on your Yubikey? Here is how! (Shamelessly borrowed from this comment by Frederico Araujo). Note, this is not the same as configuring your terminal to use a Yubikey setup to be used as TOTP for AWS-instead of an app!

NOTE: These steps are for use on macOS and should be similar for Linux

  1. Remove existing credential from AWS Vault Run only if you already have it setup before:

aws-vault remove myprofile

@micolous
micolous / glitch.sh
Last active January 15, 2020 11:44
"Does anyone know how to use xrandr" glitch slides using ffmpeg. #lca2020
#!/bin/bash
# "Does anyone know how to use xrandr" glitch slides using ffmpeg. #lca2020
# Author: Michael Farrell <[email protected]>
# License: BSD-2-Clause or CC-0 (your choice).
#
######
#
# For linux.conf.au in Gold Coast, Ruan (@xfxf) asked me to make a simple "smoosh / defrag"
# slide that would be displayed as a holding slide between talks. I made some others with some
# AV team "in-jokes"... :)
@llimllib
llimllib / install.sh
Last active February 19, 2024 13:56
#!/usr/bin/env bash
# many settings from https://raw.githubusercontent.com/mathiasbynens/dotfiles/master/.macos
# many settings from https://raw.githubusercontent.com/thoughtbot/laptop/master/mac
# instructions on finding the default you've changed: https://pawelgrzybek.com/change-macos-user-preferences-via-command-line/
# previous install notes at:
# https://gist.github.com/llimllib/ee591266e05bd880629a4e7511a61bb3
# https://gist.github.com/llimllib/e864a92da94ceb1ef0da2e06fd1f8d70
fancy_echo() {
local fmt="$1"; shift
@hollyallen
hollyallen / Offboarding_from_18F.md
Last active September 14, 2020 15:16
Holly's list of 18F offboarding tasks
  • Official handbook page
  • Save the usernames and passwords for systems you may need when you are no longer an employee, such as
  • Log into Employee Express
    • Write down your login information for employee express. You can't get this back after you leave GSA.
  • Switch your W2s to Mail instead of Electronic
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active November 15, 2024 12:45 — 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 to 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.

Source: Institute for Professional Excellence in Coaching

Powerful questions are open-ended, clarity seeking, probing, challenging, thought-provoking, future directed, solution oriented questions that cause a person to search for answers and new possibilities.

  • What can you do about this?
  • What about that makes it work?
  • What other choices can you make?
  • What’s another way to look at that?
  • How can you reframe that to help you move on?
  • What’s your next step?
@albertcarrete
albertcarrete / readme.md
Last active December 28, 2017 06:36
Surface Pro 4 Arch Linux Installation

Dual Booting Arch Linux / Windows 10 on a Surface Pro 4

Device: Surface Pro 4

OS: Windows 10 / Arch Linux 4.3.3 - 2016.01.01

Method: Arch Linux USB Installer

Shrink volume in Windows 10

Follow the instructions in disk partition windows.

Boot from USB

@alber70g
alber70g / README.md
Last active March 6, 2017 10:01
Visual Studio Code (VS Code) shell script for use with Git Bash

VS Code Shell Shortcut for Git Bash

Put this file code in C:\Users\<username>\AppData\Local\Code\bin aside code.cmd.

Assuming this path is already in your %PATH% you can now run the command to open a file

code file.txt
@jacobian
jacobian / userChrome.css
Created October 14, 2013 20:01
Remove Firefox bookmark toolbar icons
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
#PlacesToolbarItems .bookmark-item .toolbarbutton-icon {
display:none !important
}