This file contains hidden or 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 | |
BOSEMAC="28:xx:xx:xx:xx:xx" | |
SONYMAC="70:xx:xx:xx:xx:xx" | |
if [[ $1 == "--sony" ]]; then | |
MAC=$SONYMAC | |
elif [[ $1 == "--bose" ]]; then | |
MAC=$BOSEMAC | |
else | |
echo "usage: ./connect-headphones.sh <--sony|--bose>" |
This file contains hidden or 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
map $server_port $onioned { | |
800 "yep"; | |
default "nope"; | |
} | |
server { | |
listen 127.0.0.1:443 ssl http2; # web | |
listen 127.0.0.1:800 ssl http2; # onion | |
server_name dl.condi.me; |
This file contains hidden or 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
main | |
*.o | |
*.so |
This file contains hidden or 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
/* | |
* bin2hex.c - base32 to hex conversion tool for TOTP tokens | |
* Copyright (C) 2018 Ben Cordero | |
* | |
* 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 |
This file contains hidden or 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
docker pull gentoo/stage3-amd64 | |
docker run -it --rm -v /usr/portage:/usr/portage gentoo/stage3-amd64 | |
echo 'USE="-cups -gtk -webstart -X"' >> /etc/portage/make.conf | |
emerge -pvt dev-util/bazel |
This file contains hidden or 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
Launch a service on 127.0.0.1:9090 | |
hit it, sending the original destination IP:host as a header. | |
problems: | |
- Can't do domains | |
- Can't do https | |
-> envoy doesn't support `http_proxy` or the CONNECT protocol yet | |
curl localhost:10000 -H x-envoy-original-dst-host:\ 127.0.0.1:9090 -v |
This file contains hidden or 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
Here's some stuff to extend your laptop's battery life and stop it making | |
loud noises whenever you open up a new browser tab. | |
Slows things down a bit, but the GUI stays responsive, so who cares?! | |
# cat /usr/local/bin/set_intel_pstate.sh | |
#!/bin/sh | |
set -ex | |
# Cap the CPU at 20%, slows the computer down, but modern processors are fast enough anyway. | |
# You'll be fine. |
This file contains hidden or 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
PUSHOVER_TOKEN= | |
PUSHOVER_USER_TOKEN= | |
DATABASE_URL= | |
# https://pushover.net/ is a service that sends notifications to your phone | |
# It's free for a week, or a $5 one-time charge if you want to keep it. | |
# Save this function in ~/.bashrc | |
function pushover { | |
if [ -z "${1}" ]; then | |
return 1; |
This file contains hidden or 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
--- packagelist.txt 2018-04-05 12:06:50.325274557 +0100 | |
+++ ecs-packagelist.txt 2018-04-05 12:21:47.146084516 +0100 | |
@@ -1,28 +1,12 @@ | |
Loaded plugins: priorities, update-motd, upgrade-helper | |
Installed Packages | |
-acl.x86_64 2.2.49-6.11.amzn1 installed | |
acpid.x86_64 2.0.19-6.7.amzn1 installed | |
-alsa-lib.x86_64 1.0.22-3.9.amzn1 installed | |
-amazon-ssm-agent.x86_64 2.2.120.0-1.amzn1 installed | |
-at.x86_64 3.1.10-48.15.amzn1 installed |
This file contains hidden or 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 2005-2014 Gentoo Foundation | |
* Distributed under the terms of the GNU General Public License v2 | |
* | |
* Copyright 2005-2010 Ned Ludd - <[email protected]> | |
* Copyright 2005-2014 Mike Frysinger - <[email protected]> | |
*/ | |
#ifdef APPLET_qmerge |