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 | |
# Install to /usr/local/bin/dkms-sign-module (mode 0744) | |
# Create /etc/dkms/<module>.conf with contents: | |
# POST_BUILD=../../../../../../usr/local/bin/dkms-sign-module | |
set -x | |
do_sign() { | |
/lib/modules/$kernelver/build/scripts/sign-file sha256 /etc/kernel/mok/mok.{key,der} "$1" |
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
// Copyright 2017 Google Inc. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// https://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
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
[Unit] | |
Description=VNC server | |
[Service] | |
Type=simple | |
User=%i | |
PAMName=login | |
Environment=DISPLAY=:9 |
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/sh | |
set -o nounset | |
set -o errexit | |
BAT=/sys/class/power_supply/BAT0 | |
if [[ ! -d $BAT ]]; then | |
echo 'No battery' | |
exit 0 |
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
#!/usr/bin/env python3 | |
import sys | |
if len(sys.argv) <= 1: | |
print('usage: %s <search text>' % sys.argv[0], file=sys.stderr, flush=True) | |
sys.exit(1) | |
search = ' '.join(sys.argv[1:]) |
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 -x | |
# required for dpkg to work | |
export PATH=/usr/bin:/usr/sbin:/bin:/sbin | |
cat >/etc/apt/sources.list <<EOF | |
deb http://ap-southeast-2.archive.ubuntu.com/ubuntu/ trusty main restricted multiverse universe | |
deb http://ap-southeast-2.archive.ubuntu.com/ubuntu/ trusty-updates main restricted multiverse universe |
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
#!/usr/bin/env python3 | |
""" Test Alex Bellos' method of winning a guessing game. | |
Take two random numbers, a and b. The objective is to | |
guess whether a is greater than or less than b. | |
You might think you have a 50% chance of guessing correctly, | |
which is true if guessed randomly. | |
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
### Keybase proof | |
I hereby claim: | |
* I am jeremyvisser on github. | |
* I am jeremyvisser (https://keybase.io/jeremyvisser) on keybase. | |
* I have a public key whose fingerprint is CFF4 E176 D294 DAED F603 3FE2 360F 8D38 A532 6F5B | |
To claim this, I am signing this object: |
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 -x | |
export LC_ALL=C | |
sudo apt-get update | |
sudo apt-get -y install devscripts git dpatch | |
git clone git://github.com/dotwaffle/rancid-git |
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
#!/usr/bin/env python | |
""" Atmail 4 to Atmail 7.1 migration | |
Copyright (C) 2013 Ace Internet Services Pty Ltd | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
NewerOlder