Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
curl http://www.patreon.com/$1 -s | grep totalEarnings | head -n 1 | sed 's/\(.*\)">\([^<]*\).*/\2/g'
@theeternalsw0rd
theeternalsw0rd / gist:9124777
Created February 20, 2014 22:38
DTNS Current
<!DOCTYPE html>
<html>
<head>
<title>DTNS Current</title>
<style>
body { background: #111; font-size: 18px; }
#video { width: 80%; margin: auto }
#summary { width: 80%; margin: auto; color: #eee; padding: 1em;
</style>
</head>
Hookup:
HTPC via hdmi to Sony STR-DN1040.
Sony connected to LG tv via hdmi on port B (non-arc port).
TV's arc is disabled, set audio output to optical, to ensure no possible feedback.
Sony set to AMP mode, not AMP+TV and hdmi passthrough is off and hdmi ctrl is off.
XBMC selected device reported capabilities:
02:11:37 T:140020364109824 NOTICE: m_deviceName : hdmi:CARD=NVidia_1,DEV=3
02:11:37 T:140020364109824 NOTICE: m_displayName : HDA NVidia (NVidia_1)
02:11:37 T:140020364109824 NOTICE: m_displayNameExtra: SNY LG TV on HDMI #3
@theeternalsw0rd
theeternalsw0rd / valgrind.10.9.patch
Created December 16, 2013 03:06
Latest patch from https://bugs.kde.org/show_bug.cgi?id=326724 to get valgrind to build on Mavericks.
Index: configure.ac
===================================================================
--- configure.ac (revision 13713)
+++ configure.ac (working copy)
@@ -301,6 +301,7 @@
AC_DEFINE([DARWIN_10_6], 100600, [DARWIN_VERS value for Mac OS X 10.6])
AC_DEFINE([DARWIN_10_7], 100700, [DARWIN_VERS value for Mac OS X 10.7])
AC_DEFINE([DARWIN_10_8], 100800, [DARWIN_VERS value for Mac OS X 10.8])
+ AC_DEFINE([DARWIN_10_9], 100900, [DARWIN_VERS value for Mac OS X 10.9])
@theeternalsw0rd
theeternalsw0rd / mac_vis_invalid.patch
Created June 14, 2016 23:35
Openssh on Mac Sierra invalid VIS declarations workaround
diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c
index 9f7ca14..b2a09c0 100644
--- a/openbsd-compat/setproctitle.c
+++ b/openbsd-compat/setproctitle.c
@@ -43,7 +43,7 @@
#endif
#include <string.h>
-#include <vis.h>
+#include "vis.h"
diff --git a/cmd_behave_screen_edge.c b/cmd_behave_screen_edge.c
index f736086..4d529c3 100644
--- a/cmd_behave_screen_edge.c
+++ b/cmd_behave_screen_edge.c
@@ -4,12 +4,6 @@
#include <time.h> /* for clock_gettime */
#include <sys/time.h> /* for timeradd and friends */
-#if defined(__APPLE__) && defined(__MACH__)
-/* http://code.google.com/p/semicomplete/issues/detail?id=37
@theeternalsw0rd
theeternalsw0rd / # imap-uw - 2017-08-09_15-12-37.txt
Created August 9, 2017 19:28
imap-uw on macOS 10.13 - Homebrew build logs
Homebrew build logs for imap-uw on macOS 10.13
Build date: 2017-08-09 15:12:37
@theeternalsw0rd
theeternalsw0rd / # openssl@1.1 - 2017-08-10_14-09-19.txt
Created August 10, 2017 18:11
openssl@1.1 on macOS 10.13 - Homebrew build logs
Homebrew build logs for openssl@1.1 on macOS 10.13
Build date: 2017-08-10 14:09:19
@theeternalsw0rd
theeternalsw0rd / gist:18617416519490421cfb5aabb65acef9
Last active August 12, 2017 01:53
Think like a programmer. Episode 2. Real solution
// I like to start with the one that has the narrowest set first. That's just personal preference.
// police department must have an even number. no need to loop to 7 which is odd.
for(int policeDepNum = 2; policeDepNum <= 6; policeDepNum += 2) {
for(int fireDepNum = 1; fireDepNum <= 7; fireDepNum++) {
// if these are equal there is no solution this loop so continue on.
if(fireDepNum == policeDepNum) {
continue;
}
// sum must equal 12. no need to loop for last number.
sanitDepNum = 12 - fireDepNum - policeDepNum;
@theeternalsw0rd
theeternalsw0rd / ego.log
Created November 7, 2017 03:46
Log of ego sync; ego update
Syncing meta-repo
Already on 'master'
Your branch is up-to-date with 'origin/master'.
HEAD is now at 3b35a1a kit updates
Already up-to-date.
Syncing core-kit branch 1.0-prime
Already on '1.0-prime'
Your branch is up-to-date with 'origin/1.0-prime'.
HEAD is now at dd661d6d updates
Already up-to-date.