Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Created by Lander Brandt
# This script will take all existing cloned subprojects and add them as
# proper git submodules
# To use, run this script from within the main project's root directory
set -e
for submodule in `git ls-files --stage | grep 160000 | cut -f 2`; do
@landaire
landaire / tmux_diff.patch
Created May 15, 2015 20:16
tmux 1.9a -> 2.0 server_client_set_title diff
diff --git a/tmux.old b/tmux.new
index eae8bba..b52efd7 100644
--- a/tmux.old
+++ b/tmux.new
@@ -1,17 +1,23 @@
void
server_client_set_title(struct client *c)
{
- struct session *s = c->session;
- const char *template;

Keybase proof

I hereby claim:

  • I am landaire on github.
  • I am lander (https://keybase.io/lander) on keybase.
  • I have a public key whose fingerprint is 1189 CE80 9D1A 492F 6E91 C70A 6BC6 9BD4 7D38 92BA

To claim this, I am signing this object:

@landaire
landaire / config.patch
Last active August 29, 2015 14:12
Revel config rework
diff --git a/config.go b/config.go
index 0bc9da1..7363a69 100644
--- a/config.go
+++ b/config.go
@@ -1,18 +1,27 @@
package revel
import (
+ "encoding/json"
+ "encoding/xml"
@landaire
landaire / header.txt
Last active August 29, 2015 14:12
Arma 3 PBO extractor header sample
Header Extension:
Name:
Flag: 0x56657273 (ProductEntry)
Original Size: 0
Reserved: 0
Timestamp: 0 (1969-12-31 16:00:00 -0800 PST)
Data Size: 0
Extended Fields:
version: 73106
@landaire
landaire / controller_disconnect.md
Last active November 23, 2020 22:12
Xbox 360 Dev Kit Controller Disconnect

Why controllers get disconnected, and why am I making this note?

Controllers get disconnected because they fail an authentication check that Microsoft broke at some point in time. Some people are unable to obtain newer recoveries because they simply do not have contacts or access to a GDN account, and are stuck on one of these broken recoveries

What do to fix making

Patch RgcSecAuthenticateDeviceAsyncStateMachine + 0x704 (should be a bge instruction, where if cr6 -- the result of r11 >= r10 -- then the authentication succeeds) so that this always branches to the "successful" block of code leaving the auth fail code as simply dead, unreachable code.

RgcSecAuthenticateDeviceAsyncStateMachine target

{"x":10,"y":-6.40625,"width":60,"height":13.015625}
{"x":-49,"y":-6.40625,"width":39,"height":13.015625}
{"x":-41,"y":-6.40625,"width":31,"height":13.015625}
{"x":-39,"y":-6.40625,"width":29,"height":13.015625}
{"x":-29,"y":-6.40625,"width":19,"height":13.015625}
{"x":10,"y":-6.40625,"width":60,"height":13.015625}
{"x":-49,"y":-6.40625,"width":39,"height":13.015625}
{"x":-41,"y":-6.40625,"width":31,"height":13.015625}
{"x":-39,"y":-6.40625,"width":29,"height":13.015625}
{"x":-29,"y":-6.40625,"width":19,"height":13.015625}
{"x":-47,"y":-6.40625,"width":37,"height":13.015625}
{"x":10,"y":-6.40625,"width":65,"height":13.015625}
{"x":10,"y":-6.40625,"width":47,"height":13.015625}
{"x":10,"y":-6.40625,"width":63,"height":13.015625}
{"x":10,"y":-6.40625,"width":21,"height":13.015625}
@landaire
landaire / chrome.json
Created July 15, 2014 23:00
Invalid getBBox() values
{"x":0,"y":-0.109375,"width":0.9375,"height":0.21875}
{"x":-0.59375,"y":-0.109375,"width":0.59375,"height":0.21875}
{"x":-0.46875,"y":-0.109375,"width":0.46875,"height":0.21875}
{"x":-0.4375,"y":-0.109375,"width":0.4375,"height":0.21875}
{"x":-0.296875,"y":-0.109375,"width":0.296875,"height":0.21875}
{"x":-0.5625,"y":-0.109375,"width":0.5625,"height":0.21875}
{"x":0,"y":-0.109375,"width":1,"height":0.21875}
{"x":0,"y":-0.109375,"width":0.734375,"height":0.21875}
{"x":0,"y":-0.109375,"width":0.984375,"height":0.21875}
{"x":0,"y":-0.109375,"width":0.328125,"height":0.21875}
Landers-MacBook-Pro:~ lander$ revel run github.com/revel/revel/samples/booking
~
~ revel! http://revel.github.io
~
INFO 2014/05/01 18:52:08 revel.go:320: Loaded module jobs
INFO 2014/05/01 18:52:08 revel.go:320: Loaded module static
INFO 2014/05/01 18:52:08 revel.go:320: Loaded module testrunner
INFO 2014/05/01 18:52:08 run.go:57: Running Booking example (github.com/revel/revel/samples/booking) in dev mode
TRACE 2014/05/01 18:52:08 run.go:58: Base path: /Users/lander/go/src/github.com/revel/revel/samples/booking
TRACE 2014/05/01 18:52:08 template.go:174: Refreshing templates from [/Users/lander/go/src/github.com/revel/revel/templates]