Skip to content

Instantly share code, notes, and snippets.

Ando "David" Roots anroots

Block or report user

Report or block anroots

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pre-push
# Chmod this to executable and put into .git/hooks
xdg-open &
anroots / hosts
Created Oct 6, 2018
Estonian DNS names that serve ads
View hosts
anroots /
Created May 31, 2018
Example on how to connect to Openshift 3 using username/password for authentication with openshift-restclient-python
# Example on how to use openshift-restclient-python
# (
# without having a local ~/.kube/config file - all params
# are in Python code.
# We needed a way to connect to an Openshift3 cluster from Python,
# without external dependencies (config file), but couldn't find
# a way to do this (to get a token using username/password) from the library documentation.
# Note #1: Logout is not implemented, the token stays valid
anroots / start_ssh_agent.bashrc
Last active Mar 28, 2018
.bashrc snippet to automatically start ssh-agent and load it with a key from YubiKey PKCS storage
View start_ssh_agent.bashrc
# Tested on Ubuntu 17.10
# Put this into your .bashrc or similar file
# It will ensure each new terminal window has ssh-agent accessible
# and loaded with YubiKey SSH key
# Built upon work from
function start_agent {
anroots /
Created Aug 1, 2016
Proof that Fleep handles UTF-8 correctly in conversation topics
# Proof that Fleep handles UTF-8 strings correctly
# and does not sanitize input into ASCII-only strings
# You'll need to create a conversation with UTF-8 characters
# in the topic, then filter this conversation out
# in the code below.
import requests
import json
anroots /
Created May 25, 2016
Give yourself random middle names in Fleep (change display name automatically every X interval)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
Randomly assign oneself middle names in Fleep
Based on
Author: 2016-05-25
Licence: MIT
Usage example (change Fleep display name every 30 seconds):
anroots /
Created May 3, 2016
Cycle the screen through "locked" and "unlocked" states while leaving user input blocked
# Script to control screen lock
# Dependencies: xtrlock, xscreensaver and xscreensaver-command
# Use case: you want the cycle the screen between ON (all windows visible)
# and OFF (blank screen saver, password needed to unlock) states while disabling user input
# when screen is ON. Great for kiosk PC-s to turn the screen off during the night.

Keybase proof

I hereby claim:

  • I am anroots on github.
  • I am anroots ( on keybase.
  • I have a public key whose fingerprint is CAF6 B111 74C8 316B B3DA F97E 9074 1680 9B91 A011

To claim this, I am signing this object:

anroots / 85-veracrypt.rules
Last active Oct 16, 2016
Load SSH key into ssh-agent from a veracrypt-encrypted drive when it's plugged in
View 85-veracrypt.rules
ACTION=="add", KERNEL=="sd?", ATTRS{serial}=="SERIAL_NUMBER_OF_USB", RUN+="/usr/local/bin/load-ssh-keys"
anroots /
Last active Apr 1, 2016
Spam random Chuck Norris facts to a list of target e-mails (spammy April Fools joke)
# Generate a random Chuck Norris fact and e-mail it to the target
# Requires the 'cowsay' and 'cn' ( programs to be installed
# Requires Mailgun API key
# Usage: ./ NUM EMAIL
# ...where NUM is an integer of how many e-mails to send and EMAIL is the target's e-mail
# Replace placeholders (Mailgun API key and domain)
You can’t perform that action at this time.