Skip to content

Instantly share code, notes, and snippets.

View x-drum's full-sized avatar

Alessio Cassibba (x-drum) x-drum

View GitHub Profile
@x-drum
x-drum / ssh-agent-shutdown.sh
Last active May 17, 2022 16:43
ssh-agent: Archlinux plasma 5
#!/bin/sh
## place in ~/.config/plasma-workspace/shutdown/ssh-agent-shutdown.sh
## exec order: "kde shutdown"
$SSH_AGENT_PID" ] || eval "$(ssh-agent -k)"
@x-drum
x-drum / keybase.md
Last active December 10, 2016 21:02

Keybase proof

I hereby claim:

  • I am x-drum on github.
  • I am xdrum (https://keybase.io/xdrum) on keybase.
  • I have a public key ASC3EwNJd4Joud28oeFP84Ort7EzCG5Gix1qZsmSDwgjfAo

To claim this, I am signing this object:

@x-drum
x-drum / gist:ff79d2a2197f1794a2bc
Created February 1, 2015 14:36
nsupdate (bind9)
cat <<TSTZONE
// file: dynamic.foo.bar.db
$TTL 86400 ; 1 minute
@ IN SOA dynamic.foo.bar. root.foo.bar. (
2001072010 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
1814400 ; expire (3 weeks)
86400 ; minimum (1 day)
)
@x-drum
x-drum / gist:b50c3f7cd9660c478e9a
Created February 1, 2015 09:43
puppet: ReduceDebian
if $::operatingsystem == 'Debian' {
file {
'/etc/dpkg/dpkg.cfg.d/01_nolocale':
ensure => present,
source => 'puppet:///private/debian/dpkg_nolocale';
'/etc/dpkg/dpkg.cfg.d/01_nodoc':
ensure => present,
source => 'puppet:///private/debian/dpkg_nodoc';
}
}
@x-drum
x-drum / gist:59ee2ef9d2767a983ade
Created January 28, 2015 20:31
~/.ssh/rc file: reset xt_recent after a successful login
echo $SSH_CLIENT | awk '{printf "-%s\n", $1}' > /proc/net/xt_recent/SSH
ddns-update-style none;
deny bootp; #default
authoritative;
include "/etc/dhcp/ipxe-option-space.conf";
# GREEN
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.100 10.1.1.199;
option subnet-mask 255.255.255.0;

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@x-drum
x-drum / gist:9152336
Created February 22, 2014 11:23
Fix build with gcc-4.8 on sunxi-3.4
https://github.com/x-drum/linux-sunxi/commit/53d90d1122eacd8044f1175e400065150d99811b