Skip to content

Instantly share code, notes, and snippets.

@johnxx
johnxx / keybase.md
Created March 22, 2014 01:21
Keybase identity proof

Keybase proof

I hereby claim:

  • I am johnxx on github.
  • I am johnxx (https://keybase.io/johnxx) on keybase.
  • I have a public key whose fingerprint is 74B8 4DC1 0587 2BBE CC6E A111 531D 7C9A C9A8 0056

To claim this, I am signing this object:

protected function _generate_batch_guid() {
$algorithm = 'sha256';
$curtime = time();
$rand = openssl_random_pseudo_bytes(16);
$hash = hash($algorithm, "$this->to $this->body $curtime $rand");
$version = "1/";
return $version.$hash;
}
[19:37:34] [Client thread/INFO]: Connecting to kira.ageofikon.com, 25565
[19:37:40] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@5ce44fd8[id=d25a3f8e-36dc-48df-992b-9b2d5658ebc9,name=murdersaur,properties={},legacy=false]
com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time
at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:65) ~[YggdrasilAuthenticationService.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:135) [YggdrasilMinecraftSessionService.class:?]
at net.minecraft.client.resources.SkinManager$3.run(SourceFile:106) [brm.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_77]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_77]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unkn
@johnxx
johnxx / rsyslog.conf.patch
Created May 6, 2016 00:54
Enabling rsyslog remote listening on Debian
--- rsyslog.conf.bak 2015-02-19 09:48:58.829059788 +0000
+++ rsyslog.conf 2015-03-12 00:33:46.052507878 +0000
@@ -20,6 +20,9 @@
#$ModLoad imtcp
#$InputTCPServerRun 514
+$ModLoad imrelp
+$InputRELPServerRun 10514
+
@johnxx
johnxx / wider-than.sh
Created May 6, 2016 18:05
Links pictures over a certain width (and ratio) to a new directory
#!/bin/sh
[ $1 != '' ] || exit 1
source=$1
width=$2
IFS='
'
debug=1
mkdir -p $width
for n in $(find $source -type f -regextype posix-egrep \
-regex '.*.(png|jpg|jpeg|gif)') ; do
@johnxx
johnxx / cssgrep.sh
Created August 24, 2018 21:01
Use html-xml-utils like grep with CSS selectors
#!/bin/bash
if ! which hxselect > /dev/null; then
echo You need hxselect and hxnormalize
echo Run this: sudo apt-get install html-xml-utils
exit 1
fi
hxselect="hxselect -s \n -i"
hxnormalize="hxnormalize -l 10000000 -x "
@johnxx
johnxx / 2018-11-02_01.26.02.csv
Last active November 3, 2018 07:50
Composite Log 2018-11-02
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 1 column, instead of 6. in line 2.
#Firmware: Speeduino 2018.9-dev
MARK 000
0.0,0.0,0.0,1.0,NaN,63.688
1.0,0.0,0.0,1.0,36.436,100.124
0.0,0.0,0.0,1.0,10.896,111.02
0.0,1.0,1.0,1.0,19.508,130.528
0.0,0.0,1.0,1.0,9.108,139.636
1.0,0.0,0.0,1.0,35.228,174.864
0.0,0.0,0.0,1.0,8.0,182.864
diff --git a/ardustim/ISRs.cpp b/ardustim/ISRs.cpp
index 813dc3e..c4a722e 100644
--- a/ardustim/ISRs.cpp
+++ b/ardustim/ISRs.cpp
@@ -79,6 +79,7 @@ wheels Wheels[MAX_WHEELS] = {
{ oddfire_vr_friendly_name, oddfire_vr, 0.2, 24 },
{ optispark_lt1_friendly_name, optispark_lt1, 3.0, 720 },
{ twelve_minus_three_friendly_name, twelve_minus_three, 0.4, 48 },
+ { subaru_six_seven_name_friendly_name, subaru_six_seven, 3.0, 720 },
{ thirty_six_minus_two_two_two_friendly_name, thirty_six_minus_two_two_two, 0.6, 72 },
@johnxx
johnxx / Speeduino Tune 2018-11-12.msq
Created November 12, 2018 20:41
Current Speeduino tune for 1996 Subaru Impreza (no start)
<?xml version="1.0" encoding="ISO-8859-1"?>
<msq xmlns="http://www.msefi.com/:msq">
<bibliography author="TunerStudio MS 3.0.28 - EFI Analytics, Inc." tuneComment="" writeDate="Mon Nov 12 11:55:37 PST 2018"/>
<versionInfo fileFormat="5.0" firmwareInfo="Speeduino+2018.9-dev" nPages="10" signature="speeduino 201809-dev"/>
<page>
<pcVariable name="tsCanId">"CAN ID 0"</pcVariable>
<pcVariable cols="1" digits="0" name="algorithmLimits" rows="8">
511.0
100.0
511.0