This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ aria2c --max-connection-per-server=16 \ | |
--min-split-size=1M \ | |
--header="Cookie: oraclelicense=accept-securebackup-cookie" \ | |
--http-proxy="http://1.2.3.4:3128" \ | |
http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz | |
08/15 09:22:34 [NOTICE] Downloading 1 item(s) | |
[#3114d1 176MiB/176MiB(99%) CN:3 DL:10MiB] | |
08/15 09:22:52 [NOTICE] Download complete: /tmp/tmp/jdk-8u144-linux-x64.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the option --no-rlimits makes the difference | |
[Unit] | |
Description=Avahi mDNS/DNS-SD Stack | |
Requires=avahi-daemon.socket | |
[Service] | |
Type=dbus | |
BusName=org.freedesktop.Avahi | |
# Debian path is /usr/sbin/avahi-daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
REPO_PATH=$1 | |
cd $REPO_PATH | |
git=$(which git) | |
git add -A && git commit -m "Scripted auto-commit on change triggerd by systemd.path" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this script isntalls zfs via dkms and needs sudo package installed an | |
# configured for the user who runs this script. | |
# | |
# The zpools are named tank. | |
# Give the disk you want to use for the zpool as $1 | |
# | |
# https://wiki.archlinux.org/index.php/ZFS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Container Plex | |
Documentation=man:systemd-nspawn(1) | |
PartOf=machines.target | |
Before=machines.target | |
After=network.target zfs-mount.service | |
[Service] | |
ExecStart=/usr/bin/systemd-nspawn \ | |
--quiet \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE busconfig PUBLIC | |
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | |
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | |
<busconfig> | |
<!-- Only root or user avahi can own the Avahi service --> | |
<policy user="avahi"> | |
<allow own="org.freedesktop.Avahi"/> | |
</policy> | |
<policy user="root"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[ $- != *i* ]] && return | |
alias ls='ls --color=auto' | |
alias l='ls -lahtr --color=auto --time-style="+ %F %H:%M │ "' | |
alias ll='ls -l --color=auto --time-style="+ %F %H:%M │ "' | |
alias grep='grep --color=auto' | |
export PS1="\[\u@$(hostname -f): \w\]\n\$ " | |
[ -e "/etc/DIR_COLORS" ] && DIR_COLORS="/etc/DIR_COLORS" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding=utf8 | |
import re | |
import urllib2 | |
matches = [] | |
feed_url = 'https://www.archlinux.org/feeds/release/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# confirm you can access the internet | |
if [[ ! $(curl -Is http://www.google.com/ | head -n 1) =~ "200 OK" ]]; then | |
echo "Your Internet seems broken. Press Ctrl-C to abort or enter to continue." | |
read | |
fi | |
# make 2 partitions on the disk. | |
parted -s /dev/sda mktable msdos | |
parted -s /dev/sda mkpart primary 0% 100% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# colours | |
GREEN='\033[0;32m' | |
NC='\033[0m' | |
CWD=/tmp/zfs-$(date +%Y-%m-%d) | |
mkdir $CWD | |
cd $CWD |