apt-get update; apt-get upgrade
dphys-swapfile swapoff
dphys-swapfile uninstall
apt-get remove -y --purge wolfram-engine triggerhappy xserver-common lightdm sonic-pi minecraft-pi pigpio
apt-get autoremove -y
These instructions are based on this article: https://www.alexruf.net/2016/05/23/setup-gogs-git-service.html.
Setup Raspberry Pi with minimal Raspbian image. You need to connect to the HDMI port and set the following:
sudo raspi-config
There you need to enable the SSH server and you should change the hostname.
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
/* 11/27/2017 - Tweaked for a page redesign. | |
* 1/6/2018 - Handle videos in book bundle. | |
*/ | |
var pattern = /(MOBI|EPUB|PDF( ?\(H.\))?|CBZ)$/i; | |
var pattern2 = /(Download)$/; | |
var nodes = document.getElementsByTagName('a'); | |
var downloadCmd = ''; | |
for (i in nodes) { | |
var a = nodes[i]; | |
if (a && a.text && pattern.test(a.text.trim())) { |
This week (May 2017) I have been learning about Docker... Here is what I've learned so far.
The shortcut commands in brackets refer to functions/aliases I've set up in my dotfiles.
sudo apt-get install docker docker-compose
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 | |
# Save docker images | |
ds() { | |
docker images | \ | |
cut -d ' ' -f 1 | \ | |
tail -n +2 | \ | |
xargs -t -n 1 -I {} -P 4 \ | |
sh -c 'docker save {} | bzip2 > $(echo "{}" | sed "s/^.*\///").tar.bz2' | |
} |