Skip to content

Instantly share code, notes, and snippets.

View vaygr's full-sized avatar
🛡️

Val V vaygr

🛡️
View GitHub Profile
@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
;;
@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 / 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 / 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 / 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"

Effective Engineer - Notes

What's an Effective Engineer?

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

Adopt the Right Mindsets

/*
* 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
@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,
@vaygr
vaygr / xp
Last active June 11, 2020 22:29
X window [un]pause
#!/bin/sh
case "$1" in
toggle)
pgrep -x xprop && pkill -x xprop && exit 0
IFS=$'\n' info=(`xprop _NET_WM_PID _NET_WM_NAME`)
pid=`echo ${info[0]} | awk '!/not found/ { print $3 }'`
@vaygr
vaygr / i3lock-2.10-no-pam.patch
Created May 18, 2019 16:35
i3lock no-PAM patch (v2.10)
+++ LICENSE-slock
@@ -0,0 +1,24 @@
+MIT/X Consortium License
+
+© 2015-2016 Markus Teich <markus.teich@stusta.mhn.de>
+© 2014 Dimitris Papastamos <sin@2f30.org>
+© 2006-2014 Anselm R Garbe <anselm@garbe.us>
+© 2014-2016 Laslo Hunhold <dev@frign.de>
+
+Permission is hereby granted, free of charge, to any person obtaining a