Skip to content

Instantly share code, notes, and snippets.

View vaygr's full-sized avatar
🛡️

Val V vaygr

🛡️
View GitHub Profile
@vaygr
vaygr / uname26.c
Created April 13, 2018 16:38
uname 2.6 personality
/* Copyright (C) 2011 Intel Corporation
Author: Andi Kleen
Set 2.6.x personality
uname26 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; version
2.
uname26 is distributed in the hope that it will be useful,
/*
* Copyright (C) 2017 Alberts Muktupāvels
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@vaygr
vaygr / nz-sign
Created October 15, 2017 15:28
NSD zone signer
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $0 <zone>"
exit 1
fi
NSD_DNSSEC="/var/nsd/etc/keys.dnssec"
NSD_ZONES="/var/nsd/zones/master"
@vaygr
vaygr / tocgen.sh
Created August 12, 2017 19:19
TOC generator
#!/bin/sh
# tocgen.sh <directory> <file.toc>
while getopts a:p:g:d:t: option; do
case "$option" in
a) album="$OPTARG"
;;
p) performer="$OPTARG"
;;
@vaygr
vaygr / bluelock
Last active March 24, 2017 19:56
Bluetooth-based X locker
#!/bin/sh
if [ $# != 2 -o -z "$1" -o -z "$2" ]; then
echo "Usage: $(basename $0) <TRUSTED MAC> <TRUSTED DEVICE>"
exit 1
fi
while :; do
sleep 5
@vaygr
vaygr / GHROC.user.js
Last active March 20, 2019 15:14
GitHub Return Original Colors
// ==UserScript==
// @name Github Return Original Colors
// @namespace http://userstyles.org
// @description The new link color hurts your eyes? Bring back the old link and folder colors.
// @author Márk Sági-Kazár
// @homepage https://userstyles.org/styles/139584
// @include http://github.com/*
// @include https://github.com/*
// @include http://*.github.com/*
// @include https://*.github.com/*
@vaygr
vaygr / rc-fsck.patch
Created January 16, 2017 20:45
OpenBSD auto-fsck patch
Index: rc
===================================================================
RCS file: /cvs/src/etc/rc,v
retrieving revision 1.396
diff -u -p -r1.396 rc
--- rc 13 Oct 2011 07:54:06 -0000 1.396
+++ rc 8 Nov 2011 10:08:35 -0000
@@ -294,8 +294,16 @@ elif [ X"$1" = X"autoboot" ]; then
exit 1
;;