Skip to content

Instantly share code, notes, and snippets.

View m-rtijn's full-sized avatar

Martijn m-rtijn

View GitHub Profile
@m-rtijn
m-rtijn / openspades_installer.sh
Created July 14, 2016 17:35
Simple script to compile and install openspades on a debian based system.
#!/bin/sh
echo "Installing packages..."
sudo apt install -y pkg-config libglew-dev libcurl3-openssl-dev libsdl2-dev libsdl2-image-dev libalut-dev libjpeg-dev libxinerama-dev libxft-dev
echo "Installing SDL-2.0.2..."
wget http://www.libsdl.org/release/SDL2-2.0.2.tar.gz
tar -zxvf SDL2-2.0.2.tar.gz
cd SDL2-2.0.2/
./configure && make && sudo make install
@m-rtijn
m-rtijn / approximate_e.py
Created June 22, 2017 19:21
A Python3 script to approximate the value of the mathematical constant e
#!/usr/bin/python3
from math import factorial
accuracy = input("Accuracy (integer value >0):")
e = 0
for i in range(int(accuracy)):
e = e + 1/factorial(i)
#!/bin/bash
# Downloads all SSH host keys from the given hosts
echo "$@"
for HOST in "$@"
do
mkdir "$HOST"
scp $HOST:/etc/ssh/*.pub $HOST
done