- start with the device unplugged
- run
udevadm monitor --udev
- plug in the device
- see output in udevadm_monitor.out
- the device is recognisable on the third to last line as:
/dev/usb/hiddev0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -u | |
API_URL="https://api.github.com" | |
TMP_DIR="/tmp/gh-bak" | |
curl -s "$API_URL/orgs/netmelody/repos" | grep '"full_name":' | sed -rn 's/.*: \"(.*?)\".*/\1/p' > $TMP_DIR/repos.lst | |
curl -s "$API_URL/users/scarytom/repos" | grep '"full_name":' | sed -rn 's/.*: \"(.*?)\".*/\1/p' >> $TMP_DIR/repos.lst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.enigmacurry.com/2008/02/22/backing-up-my-online-brain/ | |
http://docs.offlineimap.org/en/latest/offlineimap.html | |
http://comments.gmane.org/gmane.mail.imap.offlineimap.general/5515 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# jenkins master vitals | |
CI_MASTER_HOST="ci-1.youdevise.com" | |
CI_MASTER_PORT="80" | |
# node vitals | |
NODE_HOST="tom-denley-rocks-01.youdevise.com" | |
NODE_NAME="tom-denley-rocks-name-01" | |
NODE_DESC="my node of glory" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -u | |
CI_MASTER_URL="http://ci-1" | |
node_online() { | |
curl --silent "$CI_MASTER_URL/computer/$1/api/json" | grep --silent '"temporarilyOffline":false' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
# Mirrors GitHub repos | |
# Takes a list of repos to mirror formatted as "user/reponame". | |
# The reponame can be omitted to mirror all repos for a user or organisation e.g. "youdevise/" | |
# The repos for a team can be mirrored using the syntax "team:orgname/teamname | |
#FIXME these might be better as arguments | |
MIRROR_DIR="${MIRROR_DIR:-/tmp/githubhmirror}" | |
GITHUB_USER="${GITHUB_USER:-}" |
Generating the PSK value for wpa_supplicant.conf
$ wpa_passphrase SSID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
virsh list | tail -n +3 | head -n -1 | awk -F" " '{print $2}' | sed 's/.*/\/etc\/libvirt\/qemu\/\0.xml/' | xargs grep memory | |
grep MemTotal /proc/meminfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
LOCKFILE='/var/lock/.aptly-upload.exclusivelock' | |
LOCK_TIMEOUT_SECONDS='300' | |
PROMOTE=0 | |
DISTRIBUTION='all' | |
STABLE_PREFIX='stable' | |
UNSTABLE_PREFIX='unstable' |
I hereby claim:
- I am scarytom on github.
- I am scarytom (https://keybase.io/scarytom) on keybase.
- I have a public key whose fingerprint is C819 4255 49F4 4CD5 8DCC 8BB7 E409 354C FB27 2F39
To claim this, I am signing this object:
OlderNewer