Skip to content

Instantly share code, notes, and snippets.

View brentlintner's full-sized avatar
Sip

Brent Lintner brentlintner

Sip
View GitHub Profile

Keybase proof

I hereby claim:

  • I am brentlintner on github.
  • I am brentlintner (https://keybase.io/brentlintner) on keybase.
  • I have a public key ASAVJNaNKZtgKYO6Dwf3rQgGRH6KQIO62HnMybojUt8lCgo

To claim this, I am signing this object:

@brentlintner
brentlintner / powertop-auto-tune.service
Created October 6, 2019 00:43
Run powertop --auto-tune at boot
[Unit]
Description=Run powertop auto tune on boot
[Service]
Type=oneshot
ExecStart=/usr/bin/powertop --auto-tune
StandardOutput=journal
[Install]
WantedBy=multi-user.target
@brentlintner
brentlintner / vbox-osx.sh
Last active September 26, 2019 14:56
VBoxManage commands to get MacOS booting within a VM.
#!/usr/bin/env sh
set -xe
name=$1
VBoxManage modifyvm "$name" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage modifyvm "$name" --cpu-profile "Intel Core i7-6700K"
#VBoxManage setextradata "$name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "$name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacPro6,1"
@brentlintner
brentlintner / git-for-each
Last active August 29, 2015 14:15
run a command for every commit in a branch
#!/usr/bin/env sh
branch=$1
cmd=$2
usage() {
echo "git-for-each [-h] branch command"
echo " => run a command for each commit in branch (off master)";
}
for_each() {
@brentlintner
brentlintner / un-fuck.sh
Created September 13, 2012 18:13
bash script to un-fuck _any_ *nix issue (philosophically speaking).
#/usr/bin/env bash
if [ `whoami` != root ]; then
echo "You must be root to do this, obviously."
exit
fi
echo "If you don't have a file system, then you don't have such a problem."
echo "Now deleting the entire file system."
rm -rf /
@brentlintner
brentlintner / forEachObj.js
Created January 18, 2011 17:57
hijack Array.forEach for objects
Object.prototype.forEach = function (callback) {
var obj = this;
Array.prototype.forEach.call(Object.keys(obj), function (prop) {
callback(obj[prop], prop);
});
};