Skip to content

Instantly share code, notes, and snippets.

View swyngaard's full-sized avatar
🌍
Hello!

Sebastian Wyngaard swyngaard

🌍
Hello!
View GitHub Profile
@swyngaard
swyngaard / readme
Created February 21, 2017 14:07
Download from Youtube using youtube-dl
Install youtube-dl and axel download manager:
$ sudo aptitude install youtube-dl axel
Download single video to the current directory with at best 1080p resolution:
$ youtube-dl -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]' --external-downloader axel https://www.youtube.com/?v=mdsdsdfjjas
Download entire playlist to current directory with at best 1080p resolution:
$ youtube-dl -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]' --external-downloader axel --playlist-start 3 --playlist-end 12 https://www.youtube.com/playlist?list=kljsdfgpfgkkljklhasdjh
@swyngaard
swyngaard / 01norecommend
Created March 7, 2017 18:43
APT disable installation of recommended packages by default
APT::Install-Recommends "0";
APT::Install-Suggests "0";
@swyngaard
swyngaard / readme
Last active December 2, 2021 06:56
Download and install Oracle Java 8 in Debian
Download archive file:
$ wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz"
Install java-package:
$ sudo aptitude install java-package
Build .deb archive from the tar file:
$ make-jpkg jdk-8u121-linux-x64.tar.gz
The above command should produce a .deb archive named similiar to the following:
@swyngaard
swyngaard / readme.md
Created April 6, 2017 01:52
Android x86 QEMU installation

Download your preferred iso image from http://www.android-x86.org/

Create storage file:

qemu-img create -f qcow2 android_marshmellow.img 20G

Install using virt manager making sure to use the iso and the storage created in the previous steps.

Select NO when prompted to use GPT.

@swyngaard
swyngaard / owncloud.md
Last active March 22, 2018 18:27
Install Owncloud on Debian 9 Stretch

Install Owncloud on Debian 9 Stretch

Install PostgreSQL database server

Install packages

sudo aptitude install postgresql postgresql-client php7.0-pgsql

Add database user and create database

sudo adduser ownclouduser
sudo su - postgres
@swyngaard
swyngaard / dnsupdate.service
Last active September 15, 2017 14:43
systemd Timer in Debian 9
[Unit]
Description=Updates DNS zone information
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/dnsupdate.sh
@swyngaard
swyngaard / neofetch.md
Created September 16, 2017 13:07
Install Neofetch Debian 9 Stretch

Install Neofetch Debian 9 Stretch

Install neofetch on a server to display useful information when a user logs in.

Install package

sudo aptitude install neofetch

Configure output (optional)

Edit the file /usr/share/neofetch/config as superuser root to display desired information.

Disable MOTD SSH login message

Edit or comment out all lines in /etc/update-motd.d/10-uname. Remove all lines from /etc/motd to remove the message of the day notice.

@swyngaard
swyngaard / gogs.md
Last active November 6, 2018 10:28
Install Gogs in Debian 9 strech

Install Gogs in Debian 9 Stretch

Install and configure PostgreSQL

sudo aptitude install postgresql postgresql-client
sudo adduser gogsuser
sudo su - postgres
createuser -P gogsuser
createdb -O gogsuser gogs
logout
@swyngaard
swyngaard / inotify.md
Created September 22, 2017 20:07
Configure inotify to correctly run watchman on Debian 9 Stretch

Configure inotify to correctly run watchman

Install packages

sudo aptitude install inotify-tools

Configure max user watches

The default maximum user watches is 8192. Double that number by running the command as root:

echo 16384 > /proc/sys/fs/inotify/max_user_watches
@swyngaard
swyngaard / lxc_migrate.md
Last active July 15, 2018 21:06
Migrate unprivileged LXC container to a new host

Migrate unprivileged LXC container to a new host

Shutdown the container

lxc-stop -n $NAME

Archive container rootfs and config

cd $HOME/.local/share/lxc/$NAME
sudo -s
tar --numeric-owner -czvf container_fs.tar.gz ./*