Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
which openssl > /dev/null || exit 1
which pv > /dev/null || exit 1
which sudo > /dev/null || exit 1
test -n "$1" || exit 2
disk="$1"
test -b "/dev/$disk" || exit 2

Building a grsec-patched Linux kernel for Debian 8 and DigitalOcean

It's possible to run a custom (instead of hypervisor-managed) kernel for use with Debian 8.x on a DigitalOcean droplet.

We'll build one with grsecurity, "an extensive security enhancement to the Linux kernel that defends against a wide range of security threats through intelligent access control, memory corruption-based exploit prevention, and a host of other system hardening".

Note: The stable patches for Linux 3.14.x and 3.2.x are not publicly available anymore, so we'll be applying the free 4.3.x (test) patch. The URLs and filenames in this document may become outdated, so fetch the latest from grsecurity.net and kernel.org.

Install dependencies:

@bnagy
bnagy / gpgmutt.md
Last active August 10, 2024 22:44
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@ddol
ddol / gist:1445736
Created December 8, 2011 01:51
TLDs with MX records
ai. 14170 IN MX 10 mail.offshore.ai. ;; Anguilla
as. 21371 IN MX 10 cmh.relay.gdns.net. ;; American Samoa
as. 21371 IN MX 10 dca.relay.gdns.net. ;; American Samoa
bj. 86176 IN MX 20 mail6.domain-mail.com. ;; Benin
cf. 3379 IN MX 10 mail.intnet.cf. ;; Central African Republic
dj. 345488 IN MX 5 relais2.intnet.dj. ;; Djibouti
@click0
click0 / random-ipv6-address-generator.sh
Created April 24, 2011 17:48
Random generator ipv6 addresses within your ipv6 network prefix.
#Random generator ipv6 addresses within your ipv6 network prefix.
#!/usr/local/bin/bash
# Copyright
# Vladislav V. Prodan
# [email protected]
# 2011
array=( 1 2 3 4 5 6 7 8 9 0 a b c d e f )