Skip to content

Instantly share code, notes, and snippets.

View dhensen's full-sized avatar
🎯
Focusing

Dino Hensen dhensen

🎯
Focusing
View GitHub Profile
@dhensen
dhensen / collegerama.sh
Last active June 2, 2016 12:50 — forked from mnstrspeed/collegerama.sh
Download video lectures from TU Delft Collegerama (december 2015). Requires `wget`, `curl`, and `jq` (available in Ubuntu/Debian repositories).
#!/bin/bash
# resource ID of the video, can be obtained from the video URL:
# https://collegerama.tudelft.nl/Mediasite/Play/485dbc9fac81446bae6b2ba2fe0571ac1d?catalog=cf028e9a-2a24-4e1f-bdb5-2ace3f9cd42d
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
id=$1
folder=$2
if [ -f $2 ]; then
echo "folder $2 already exists, skipping"
@dhensen
dhensen / make_backup_vbox_bootable.sh
Created March 24, 2016 22:35
shell script to make my backup bootable when converted to a virtualbox image
#!/bin/sh
mount /dev/sda1 /mnt
arch-chroot /mnt /usr/bin/rm /etc/vconsole.conf
arch-chroot /mnt /usr/bin/pacman -S --noconfirm syslinux
arch-chroot /mnt /usr/bin/syslinux-install_update -i -a -m
arch-chroot /mnt /usr/bin/sed -i.bak s/sda3/sda1/g /boot/syslinux/syslinux.cfg
rm /mnt/etc/fstab
echo "tmpfs /tmp tmpfs nodev,nosuid 0 0" > /mnt/etc/fstab
echo "/dev/sda1 / ext4 defaults,noatime 0 1" >> /mnt/etc/fstab