Skip to content

Instantly share code, notes, and snippets.

View NULLx76's full-sized avatar
🏳️‍⚧️

Vivian Roest NULLx76

🏳️‍⚧️
View GitHub Profile
@NULLx76
NULLx76 / peg.cpp
Created November 11, 2015 16:55
printer error generator
//I'm fairly new to C++, please excuse the bad code. Just put this program into your compiler of choice, and let the hilarity ensue!
#include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
using namespace std;
int random(int min, int max); //range : [min, max)
@NULLx76
NULLx76 / evo.py
Created November 3, 2015 15:49
Evolutionary python script
#!/usr/bin/python
import os
import random
import string
#Generate random string:
#target = os.urandom(12)
target = "Hello World!"
@NULLx76
NULLx76 / .zshrc
Last active September 26, 2020 21:48
My own ~/.zshrc file
# Path to your oh-my-zsh installation.
export ZSH=/home/vicx/.oh-my-zsh
#Default User
DEFAULT_USER="vicx"
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
@NULLx76
NULLx76 / extract.sh
Last active March 25, 2019 17:25
Bash function that automaticly extracts archives using the correct command (for in your ~/.bashrc)
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
@NULLx76
NULLx76 / up.sh
Last active August 28, 2015 20:45
Bash function that goes up X directories. (for in your ~/.bashrc)
up(){
local d=""
limit=$1
for ((i=1 ; i <= limit ; i++))
do
d=$d/..
done
d=$(echo $d | sed 's/^\///')
if [ -z "$d" ]; then
d=..