Skip to content

Instantly share code, notes, and snippets.

View fleetingbytes's full-sized avatar

fleetingbytes

  • Wolfsburg, Germany
  • 22:31 (UTC +02:00)
View GitHub Profile
@fleetingbytes
fleetingbytes / std_rng.rs
Created April 5, 2023 17:05
Fun Random Number Generator with Rust std lib
// Source: https://www.reddit.com/r/rustjerk/comments/103et69/who_said_there_was_no_random_number_generator_in/
// Source: https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=966e4fb514d128f9790be2fce84f8cbe
use std::collections::HashSet;
fn getrandom(dest: &mut [u8]) {
for byte in dest.iter_mut() {
for _bit in 0..8 {
let mut set = HashSet::new();
set.insert(0u8);
* create virtual environment `python -m venv /path/to/venv`
* activate venv
* python -m pip install --upgrade pip
* pip install twine
* pip install wheel
* python setup.py sdist bdist_wheel
* ls dist
* make sure you have the TestPyPI and PyPI repository URLs in your ~/.pypirc
* make sure you have the path to your certificate bundle in your ~/.pypirc
@fleetingbytes
fleetingbytes / 31_hold_shift
Created August 11, 2019 18:19
A file to disable the timeout for GRUB boot menu
#! /bin/sh
# https://wiki.archlinux.org/index.php/GRUB/Tips_and_tricks#Hide_GRUB_unless_the_Shift_key_is_held_down
set -e
prefix="/usr"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"
export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"