Skip to content

Instantly share code, notes, and snippets.

View PerArneng's full-sized avatar
💯

Per Arneng PerArneng

💯
View GitHub Profile
# requires python 3
import getpass
import hashlib
import random
#from typing import List
import sys
import math
use std::io;
use std::io::Write;
fn main() {
let mut input = String::new();
let result = io::stdin().read_line(&mut input)
.map(|s:usize| input)
.and_then(|s:String| s.parse::<u32>());
@PerArneng
PerArneng / gist:13e90e0a7bdc2f6e8172
Created October 9, 2014 07:16
A Bash function to find a directory and `cd` in to the first match. It works with wildcards `*` and `?`
function cdf() { cd `find . -type d -name "$1" | head -n1`; }