Skip to content

Instantly share code, notes, and snippets.

View rwenz3l's full-sized avatar
🔨
Building new Things.

Robin Wenzel rwenz3l

🔨
Building new Things.
View GitHub Profile
@rwenz3l
rwenz3l / makeWinUSB.sh
Created November 5, 2014 12:34
Creating Windows Boot Stick on Mac OS X
read -p "Windows_ISO_Path = " winPath
diskutil list | less
read -p "Disk_N = " disk
clear
umount /dev/${disk}
sudo diskutil eraseDisk FAT32 "WINDOWS7" MBRFormat /dev/${disk}
disk="${disk}s1"
sudo dd bs=1m if=${winPath} of=/dev/${disk}
# Single Disk Setup !
# OpenZFS on OSX Version 1.30
diskutil list
echo "Disk = disk#"
read -p "Disk = " disk
diskutil unmountDisk /dev/${disk}
sudo diskutil partitiondisk /dev/${disk} GPTFormat ZFS %noformat% 100%
echo "--------------------"
echo "Name your zpool!"
#!/bin/bash
# credits : http://www.seeds-std.co.jp/seedsblog/2005.html
# getting the repos // only if needed
# touch /etc/apt/sources.list.d/ps3mediaserver.list
# echo "deb http://www.deb-multimedia.org wheezy main non-free" > /etc/apt/sources.list.d/ps3mediaserver.list
# apt-get update && apt-get install deb-multimedia-keyring
#
#!/bin/bash
clear
cd /usr/src
wget -O btsync_x64.tar.gz http://download.getsyncapp.com/endpoint/btsync/os/linux-x64/track/stable
tar -xf btsync_x64.tar.gz -C /usr/local/sbin btsync
adduser --quiet --system --group --disabled-password
@rwenz3l
rwenz3l / youtube-dl-template
Created January 30, 2015 10:19
youtube-dl demo download all cyanide and happiness episodes
youtube-dl --output '~/Downloads/%(title)s.%(ext)s' --restrict-filenames --max-quality mp4 "https://www.youtube.com/playlist?list=PLE7j5FieXSTfwPJ2GQvSIWnMj-WDFbuCD"
@rwenz3l
rwenz3l / gist:f69bc9df245d809b40cf
Last active June 16, 2020 08:51
Install MegaTools on Debian
# su root / sudo su
apt-get -y install build-essential libglib2.0-dev libssl-dev libcurl4-openssl-dev libgirepository1.0-dev
cd /usr/src
wget https://megatools.megous.com/builds/megatools-1.10.3.tar.gz
tar -xvf megatools-1.10.3.tar.gz
cd megatools-1.10.3
@rwenz3l
rwenz3l / mkvTitleBatch
Last active February 28, 2020 04:57
Sets the MKV Title Attribute to the filename
declare mkvpropedit="/usr/bin/mkvpropedit"
declare movieDir="/path/to/movies"
function mkvTitleEdit {
filename=$(basename "${1}")
filename="${filename%.*}"
echo mkvpropedit --set title "${filename}" "${1}"
}
export -f mkvTitleEdit
@rwenz3l
rwenz3l / qt_rec_req.script
Last active August 29, 2015 14:20
Quicktime AutoRecord request
-- set the path as POSIX path
set thePath to "Macintosh HD:Users:userName:Documents:"
-- set timeStamp
set theDate to current date
set dateStamp to the year of theDate & "-" & the month of theDate & "-" & the day of theDate & " " & hours of theDate & "-" & minutes of theDate
-- set movieName
set movieName to dateStamp & ".mov"
-- set final path and make it a file reference
set filePath to thePath & movieName
set f to a reference to file filePath
@rwenz3l
rwenz3l / gist:8a7a72bdce824aa24ed2
Last active August 29, 2015 14:23
Convert IBAN Landeskennung to Zahl
static int LandeskennungToZahl(String Landeskennung){
// Beispiel Landeskennung = DE
// return Zahl = 1314
String alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
String LandesZahl = "";
for(char b : Landeskennung.toCharArray()) {
int n = 10;
for(char a : alphabet.toCharArray()) {
String buchstabe = String.valueOf(n);
System.out.println("Ist " + b + " = " + a);
@rwenz3l
rwenz3l / erstelle_verz.sh
Created July 6, 2015 20:07
Loesung zu Aufgabe 6-2
#!/bin/bash
if [ $# -eq 1 ]
then
INPUT="${1}"
else
echo "Keine Input Parameter gegeben"
exit
fi
for line in $(cat ${INPUT} | tail -n 9 | tr " " "-" | grep '[0-9]$'); do