Skip to content

Instantly share code, notes, and snippets.

View alainwolf's full-sized avatar

Alain Wolf alainwolf

View GitHub Profile
@alainwolf
alainwolf / cyanogen_sshd.sh
Last active August 25, 2023 15:37
SSH server on CyanogenMod Smaprtphones
#!/bin/sh
adb root
adb remount
#
# Create a minimal but safe SSH Daemon configuration
cat <<EndOfSSHDConfigFile > sshd_config
# Minimal OpenSSH daemon configuration for CyanogenMod 10.1+
AuthorizedKeysFile /data/.ssh/authorized_keys
ChallengeResponseAuthentication no
PasswordAuthentication no
@alainwolf
alainwolf / cacert_ubuntu.sh
Created March 15, 2014 23:46
Install CACert root certificates on Ubuntu 13.10+
sudo apt-get install ca-certificates
sudo mkdir -p /usr/share/ca-certificates/cacert.org
cd /usr/share/ca-certificates/cacert.org
wget http://www.cacert.org/certs/root.crt
wget http://www.cacert.org/certs/class3.crt
sudo dpkg-reconfigure ca-certificates
@alainwolf
alainwolf / electrum-server.conf
Last active August 29, 2015 13:57
Electrum Server Ubuntu Upstart Configuration
# electrum-server The Electrum Bitcoin Wallet Server
#
# The server indexes UTXOs by address, in a Patricia tree structure.
# Electrum Bitcoin wallet clients connect to this server.
description "Electrum server"
author "Alain Wolf"
start on started bitcoind
stop on stopping bitcoind
@alainwolf
alainwolf / bitcoind.conf
Created March 25, 2014 16:15
bitcoind Ubuntu Upstart Configuration
# bitcoind - Bitcoin core daemon
#
# Ubuntu upstart service configuration for
# Bitcoin Core Network Node.
description "Bitcoin Core daemon"
author "Alain Wolf"
# Start after network and filesystem
start on filesystem and static-network-up
@alainwolf
alainwolf / nginx_source_install
Last active August 29, 2015 14:00
Install Nginx from source with pagespeed and cache_purge modules in Ubuntu
#!/bin/sh
# Install Nginx from source with pagespeed and cache_purge modules in Ubuntu
#
# Add the official nginx.org 'mainline' (development) Ubuntu package repository
sudo -s
echo "deb http://nginx.org/packages/mainline/ubuntu/ `lsb_release -sc` nginx" \
> /etc/apt/sources.list.d/nginx.org-mainline.list
echo "deb-src http://nginx.org/packages/mainline/ubuntu/ `lsb_release -sc` nginx" \
>> /etc/apt/sources.list.d/nginx.org-mainline.list
@alainwolf
alainwolf / openpgp.txt
Created January 3, 2016 02:55
OpenKeychain API Tests
Dieses Gist bestätigt die Verknüpfte-Identität innerhalb meines OpenPGP-Schlüssels und verknüpft es mit diesem GitHub-Benutzerkonto.
Token des Nachweises:
[Verifying my OpenPGP key: openpgp4fpr:a51060c7da467c3795bbdd1bf08d9bdd13086113]
#!/bin/bash
#
# /etc/cron.daily/unbound-adblock-update
#
# Download a list of known ad-server hostnames from https://pgl.yoyo.org/as/
# for use in unbound recursive name server to block web ads on the local lan.
# See https://pgl.yoyo.org/as/
# Terminate on first error
set -e

Keybase proof

I hereby claim:

  • I am alainwolf on github.
  • I am alainwolf (https://keybase.io/alainwolf) on keybase.
  • I have a public key ASARJe47ioLYD4i72vwgry6KBeCeJJwWyczwoSNFAOeZLQo

To claim this, I am signing this object:

@alainwolf
alainwolf / cron_dehydrated_dyn.sh
Last active January 9, 2017 16:13
SSL Certficate for Servers on Dynamic IP Addresses
#!/bin/sh
#
# Cronjob for Let's Encrypt certifcate for hosts on dynamic IP.
#
# Uses letsencrypt/acme client implemented as a shell-script
# – just add water https://dehydrated.de
#
# Please don't use HSTS or HPKP headers on dynamic IPs as they
# will affect other customers using your IP in the future.
#
@alainwolf
alainwolf / pfsense-backup.sh
Last active August 28, 2023 05:08
Backup pfSense configuration files on a Synology DiskStation
#!/bin/ash
#
# Backup pfSense configuration files
# for Synology DiskStation
# Tested on
# DSM 6.1.6-15266 Update 1 - MARVELL Armada XP MV78230 (DS214+)
# pSense 2.4.3-RELEASE (amd64) - FreeBSD 11.1-RELEASE-p7
#
# Author: Alain Wolf <alain@alainwolf.ch> - https://gist.github.com/alainwolf/
# Date/Version: 2018-04-22/1.5