Skip to content

Instantly share code, notes, and snippets.

@gfabrizi
gfabrizi / docker-save-load-images.sh
Created July 27, 2018 20:19 — forked from mathewdgardner/docker-save-load-images.sh
Save / load compressed docker images
#!/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'
}
@gfabrizi
gfabrizi / Docker.md
Created July 21, 2018 15:30
Docker Reference

Docker Reference

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.

Installing Docker on Ubuntu

sudo apt-get install docker docker-compose
@gfabrizi
gfabrizi / humble_bundle_file_downloader.js
Created May 22, 2018 18:08 — forked from tlc/humble_bundle_file_downloader.js
Download HumbleBundle book bundles easier. Puts 'curl' statements on the page for you to copy.
/* 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())) {
@gfabrizi
gfabrizi / raspi-setup-gitea.md
Created May 20, 2018 09:59 — forked from mirhec/raspi-setup-gitea.md
Installing Gitea on Raspberry Pi with nginx, SSL and automatic backups

Setup Gitea on Raspberry Pi (3)

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.

@gfabrizi
gfabrizi / gogs-on-rpi.md
Created May 20, 2018 09:55 — forked from alex-shpak/gogs-on-rpi.md
Gogs on raspberry pi

Update and install dependencies

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