Skip to content

Instantly share code, notes, and snippets.

View mhristache's full-sized avatar

Maximilian Hristache mhristache

  • Göteborg, Sweden
View GitHub Profile
@mhristache
mhristache / pps.sh
Last active February 16, 2021 22:17 — forked from pavel-odintsov/pps.sh
pps.sh for habrahabr
#!/bin/bash
INTERVAL="1" # update interval in seconds
if [ -z "$1" ]; then
echo
echo usage: $0 [network-interface]
echo
echo e.g. $0 eth0
echo
@mhristache
mhristache / rust_regex.rs
Created January 1, 2017 16:16
Rust regex issue
extern crate regex;
use std::borrow::Cow;
fn main() {
let input = "\x1b[34mfoo";
assert_eq!(strip_formatting(input), "foo");
}
// Regex 0.1
execve("/usr/local/bin/cargo", ["cargo", "update"], [/* 50 vars */]) = 0
brk(0) = 0x7f5202a04000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f520128a000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("tls/x86_64/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("x86_64/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/x86_64/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls/x86_64", 0x7fffaad15c20) = -1 ENOENT (No such file or directory)