This file contains hidden or 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
//! Workaround for https://github.com/rust-bakery/nom/issues/1679 | |
use core::marker::PhantomData; | |
use nom::{ | |
error::{ErrorKind, ParseError}, | |
AsChar, Err, ExtendInto, Input, IsStreaming, Mode, Needed, Offset, OutputMode, Parser, | |
}; | |
/// Matches a byte string with escaped characters. | |
/// |
This file contains hidden or 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
openapi: "3.0.3" | |
info: | |
title: Service with different authentication | |
version: "0.1" | |
paths: | |
/default_optional_auth: | |
get: | |
summary: Method with optional authentication, from a default policy. | |
operationId: default_optional_auth |
This file contains hidden or 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
/* | |
https://github.com/jam1garner/binrw/issues/235 | |
[dependencies] | |
binrw = "0.13.1" | |
hex = "0.4.3" | |
sha2 = "0.10.8" | |
## OUTPUT |
This file contains hidden or 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
% RUST_LOG=trace cargo run --example nfc_token_info --features nfc | |
Running `~/webauthn-rs/target/debug/examples/nfc_token_info` | |
2022-09-18T09:02:32.931534Z INFO webauthn_authenticator_rs::nfc: Using reader: "ACS ACR122U" | |
2022-09-18T09:02:32.931588Z INFO nfc_token_info::core: Using reader: NFCReader { reader_id: "ACS ACR122U" } | |
2022-09-18T09:02:32.933665Z TRACE webauthn_authenticator_rs::nfc: rdr_state: CHANGED | EMPTY | |
2022-09-18T09:02:32.933690Z INFO webauthn_authenticator_rs::nfc: Card removed | |
2022-09-18T09:02:39.505864Z TRACE webauthn_authenticator_rs::nfc: rdr_state: CHANGED | PRESENT | |
2022-09-18T09:02:39.508551Z TRACE webauthn_authenticator_rs::nfc: ATR: [3b, 8d, 80, 01, 80, 73, c0, 21, c0, 57, 59, 75, 62, 69, 4b, 65, 79, f9] | |
2022-09-18T09:02:39.508662Z TRACE webauthn_authenticator_rs::nfc: Parsed: Atr { protocols: [0, 1], t1: [128, 115, 192, 33, 192, 87, 89, 117, 98, 105, 75, 101, 121], storage_card: false, card_issuers_data: Some([89, 117, 98, 105, 75, 101, 121]), c |
This file contains hidden or 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
"use strict"; | |
/** | |
* @file Flappy Birb (for Last Call BBS) | |
* @version 1.2 | |
* @copyright 2022 Michael Farrell | |
* @author Michael Farrell <micolous+git@gmail.com> | |
* @license Apache-2.0 | |
* | |
* Changes: | |
* |
This file contains hidden or 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
/* | |
Input Pull-up Serial + Debounce | |
This example demonstrates the use of pinMode(INPUT_PULLUP). It reads a digital | |
input on pin 2 and prints the results to the Serial Monitor. | |
The circuit: | |
- momentary switch attached from pin 2 to ground | |
- built-in LED on pin 13 |
This file contains hidden or 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
// ==UserScript== | |
// @name Discord: MIDI controlled PTT | |
// @version 1 | |
// @grant none | |
// @match https://discord.com/* | |
// ==/UserScript== | |
/* | |
* This listens for any MIDI device sending a "note on" or "note off" event, | |
* and rebinds this to F9. |
This file contains hidden or 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
// ==UserScript== | |
// @name Streamyard: Keyboard Shortcuts | |
// @version 1.0 | |
// @grant none | |
// @match https://streamyard.com/* | |
// ==/UserScript== | |
// | |
// Copyright 2020 Michael Farrell <micolous+git@gmail.com> | |
// | |
// Redistribution and use in source and binary forms, with or without |
This file contains hidden or 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
#!/bin/bash | |
# "Does anyone know how to use xrandr" glitch slides using ffmpeg. #lca2020 | |
# Author: Michael Farrell <micolous+git@gmail.com> | |
# 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"... :) |
This file contains hidden or 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
/** | |
* Runs `pkg-config`: | |
* https://github.com/JetBrains/kotlin-native/issues/1534#issuecomment-384894431 | |
*/ | |
fun runPkgConfig( | |
vararg packageNames: String, | |
cflags: Boolean = false, | |
libs: Boolean = false): List<String> { | |
val p = ProcessBuilder(*(listOfNotNull( | |
"pkg-config", |
NewerOlder