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
otp = lambda *args: [a ^ b for a, b in zip(*args)] |
Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.
Gotten from the RedHat GPG migration manual
## Export all public keys
gpg -a --export >mypubkeys.asc
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
@commands.guild_only() | |
# Command cannot be used in private messages. | |
@commands.dm_only() | |
# Command can only be used in private messages. | |
@commands.is_owner() | |
# Command can only be used by the bot owner. | |
@commands.is_nsfw() |
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
// This is a quick analysis of Linux's use of RDRAND. All double-slash (//) | |
// style comments are my own, all slash-star (/*) style comments are from the | |
// original code. This was written by Taylor Hornby (@DefuseSec). | |
// This is part of the drivers/char/random.c file. | |
// I have re-ordered the procedures for clarity. Everything inside them (except | |
// comments) is exactly as you will find it in linux-3.11.tar.xz | |
// This comment says it 'does not use' the hardware RNG. It actually does. | |
/* |
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 std::marker::PhantomData; | |
pub enum Void {} | |
impl Void { | |
fn any(&self) -> ! { | |
match *self {} | |
} | |
} |