Skip to content

Instantly share code, notes, and snippets.

View chadcatlett's full-sized avatar

Chad Catlett chadcatlett

  • Somewhere in Texas
View GitHub Profile
@chadcatlett
chadcatlett / scar_tissue.md
Created July 1, 2023 04:02 — forked from gtallen1187/scar_tissue.md
talk given by John Ousterhout about sustaining relationships

"Scar Tissues Make Relationships Wear Out"

04/26/2103. From a lecture by Professor John Ousterhout at Stanford, class CS142.

This is my most touchy-feely thought for the weekend. Here’s the basic idea: It’s really hard to build relationships that last for a long time. If you haven’t discovered this, you will discover this sooner or later. And it's hard both for personal relationships and for business relationships. And to me, it's pretty amazing that two people can stay married for 25 years without killing each other.

[Laughter]

> But honestly, most professional relationships don't last anywhere near that long. The best bands always seem to break up after 2 or 3 years. And business partnerships fall apart, and there's all these problems in these relationships that just don't last. So, why is that? Well, in my view, it’s relationships don't fail because there some single catastrophic event to destroy them, although often there is a single catastrophic event around the the end of the relation

#include "pch.h"
#include <winrt/Windows.Gaming.Input.h>
#include <winrt/Windows.Devices.Power.h>
using namespace winrt;
using namespace Windows::Gaming::Input;
int main()
{
init_apartment();
printf("Attempting to enumerate all gamepads\n");
@chadcatlett
chadcatlett / keybase.md
Created November 23, 2019 00:49
keybase.md

Keybase proof

I hereby claim:

  • I am chadcatlett on github.

  • I am chadcatlett (https://keybase.io/chadcatlett) on keybase.

  • I have a public key ASD6-nNBFBRi4SysHEkJplrPf0zun2lBAvHuaNQVW5Mx3Ao

@chadcatlett
chadcatlett / urldecode.jq
Created February 16, 2019 01:05
no idea where i found this
def urldecode:
def unhex:
if 48 <= . and . <= 57 then . - 48 elif 65 <= . and . <= 70 then . - 55 else . - 87 end;
def bytes:
def loop($i):
if $i >= length then empty else 16 * (.[$i+1] | unhex) + (.[$i+2] | unhex), loop($i+3) end;
[loop(0)];
def codepoints:
# Usage: convert os_device
# Convert an OS device to the corresponding GRUB drive.
# This part is OS-specific.
convert () {
# First, check if the device file exists.
if test -e "$1"; then
:
else
echo "$1: Not found or not a block device." 1>&2
exit 1
diff --git a/configure.yml b/configure.yml
index 3ee5669..7ade25e 100644
--- a/configure.yml
+++ b/configure.yml
@@ -1,4 +1,4 @@
-- hosts: 127.0.0.1
+- hosts: localhost
connection: local
gather_facts: False
roles:
[url "https://github.com/"]
insteadOf = git://github.com/
From 9a5a4343f378cf5dbd35f113e374a50db36560a4 Mon Sep 17 00:00:00 2001
From: Alex Samorukov <samm@os2.kiev.ua>
Date: Fri, 8 Aug 2014 14:41:44 +0200
Subject: [PATCH] Fix broken build on systems w/o system versioning support
---
Makefile.am | 2 ++
configure.ac | 13 +++++++++++++
2 files changed, 15 insertions(+)
$ file *
PORSCHE 996 TWIN TURBO INTERCOOLER INSTALLATION.pdf: PDF document, version 1.5
jpg_to_pdf.pdf: PDF document, version 1.3
test.pdf: PDF document, version 1.4
def disable_proxy(kick_token):
path = '/etc/sysconfig/rhn/up2date'
mode = 0600
tempfd, temp_path = mkstemp()
try:
new_file = open(temp_path, 'w')
old_file = open(path)
except (IOError, OSError) as err:
klog(kick_token, 'Problem disabling proxy for RHN <%s>.' % str(err))
return False