Skip to content

Instantly share code, notes, and snippets.

View estsauver's full-sized avatar

Earl St Sauver estsauver

View GitHub Profile
<?xml version="1.0"?>
<gpx creator="popsicles" version="1.1"><wpt lat="6.435937233462622" lon="2018-12-09T13:02:42Z"><ele>2.78</ele><time>2018-12-09T13:29:44+01:00
</time></wpt><wpt lat="6.435905249799006" lon="2018-12-09T13:02:49Z"><ele>2.78</ele><time>2018-12-09T13:29:44+01:00
</time></wpt><wpt lat="6.435854608994137" lon="2018-12-09T13:03:00Z"><ele>2.78</ele><time>2018-12-09T13:29:44+01:00
</time></wpt><wpt lat="6.435846613077124" lon="2018-12-09T13:03:08Z"><ele>2.78</ele><time>2018-12-09T13:29:45+01:00
</time></wpt><wpt lat="6.435795972266428" lon="2018-12-09T13:03:19Z"><ele>2.78</ele><time>2018-12-09T13:29:45+01:00
</time></wpt><wpt lat="6.435729339613065" lon="2018-12-09T13:03:26Z"><ele>2.78</ele><time>2018-12-09T13:29:45+01:00
</time></wpt><wpt lat="6.435678698790666" lon="2018-12-09T13:03:31Z"><ele>2.78</ele><time>2018-12-09T13:29:46+01:00
</time></wpt><wpt lat="6.435612066121922" lon="2018-12-09T13:03:38Z"><ele>2.78</ele><time>2018-12-09T13:29:46+01:00
</time></wpt><wpt lat="6.4355534293662116" lon="
This file has been truncated, but you can view the full file.
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="1200" height="1110" onload="init(evt)" viewBox="0 0 1200 1110" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Flame graph stack visualization. See https://github.com/brendangregg/FlameGraph for latest version, and http://www.brendangregg.com/flamegraphs.html for examples. -->
<!-- NOTES: -->
<defs >
<linearGradient id="background" y1="0" y2="1" x1="0" x2="0" >
<stop stop-color="#eeeeee" offset="5%" />
<stop stop-color="#e0e0ff" offset="95%" />
</linearGradient>
@estsauver
estsauver / FiniteAutoCompleteTextView.java
Created September 4, 2016 15:19
A simple way of limiting auto complete choices to a finite set
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Resources;
import android.os.Build;
import android.util.AttributeSet;
import android.widget.AutoCompleteTextView;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.ListAdapter;
@estsauver
estsauver / error.markdown
Created February 8, 2015 04:22
Function Implementation

I'm writing a parser combinator library. I thought maybe I could also make the parser structs functions that operate on input, but I can't get the types right. The offending code.

Earls-MacBook-Pro:farce earljstsauver$ head 10 src/parser.rs 
head: 10: No such file or directory
==> src/parser.rs <==
pub trait Parser<'b>: Fn(&str, Option<&str>) {
}


impl &lt;'a&gt; Fn(&amp;str, Option&lt;&amp;str&gt;) for LiteralParser&lt;'a&gt; {
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v2.0.1
Comment: https://keybase.io/crypto
wcBMA0LRcvxegGy/AQgAmHK4gXwl9GeGz4jRRqpH7Uy1MGnQ6rsUyay+l4txkrnE
6LkKPWfmXYx1Gppxe+06maz3ZzmT9IGwXE/cnKTYae6X48F/glu4Y75zRKuKSDLz
lCzwJxpy5o6Qwb7vIyZvJpRRf+qMJkRLZcYlw4G2q2YY9KoKv39SNsMnVoWDmmk3
9oOUo52sb3PzKnlAR1nteZmRsi2l1QToVSV//UqXXAGRA/Zxs9xlizy+r5UnQ5Tz
EsmfMaLRwH8rOILPPMV0Ku0JcH1ci7R4aCW8YZfYe7mVkMr4sMITZ1/6YnrAKgW+
vcpa0n0aIgrIWnwb0wIKEt5UTS6K7Dh0ZYrLt0pA+MHBTAOg4xJfZjLE6gEP/3i5
What's it like?
@estsauver
estsauver / keybase.md
Created January 23, 2015 21:28
keybase.md

Keybase proof

I hereby claim:

  • I am estsauver on github.
  • I am estsauver (https://keybase.io/estsauver) on keybase.
  • I have a public key whose fingerprint is RETU RN T HIS. PGP. GET_ FING ERPR INT( ); }

To claim this, I am signing this object:

enum ParseResult<T> {
Success(T),
Failure,
Error
}
impl <T> ParseResult<T> {
fn map<U, F: Fn(T) -> U>(&self, f: F) -> ParseResult<U> {
match *self {
ParseResult::Success(t) => ParseResult::Success(f(t)),
@estsauver
estsauver / keybase.md
Created December 12, 2014 05:46
keybase.md

Keybase proof

I hereby claim:

  • I am estsauver on github.
  • I am estsauver (https://keybase.io/estsauver) on keybase.
  • I have a public key whose fingerprint is 3916 1459 3D61 A943 C2CB 2439 A36A 2675 02DD A09A

To claim this, I am signing this object:

/* See license.txt for terms of usage */ .firebugCanvas { position:fixed; top: 0; left: 0; display:none; border: 0 none; margin: 0; padding: 0; outline: 0; } .firebugCanvas:before, .firebugCanvas:after { content: ""; } .firebugHighlight { z-index: 2147483646; position: fixed; background-color: #3875d7; margin: 0; padding: 0; outline: 0; border: 0 none; } .firebugHighlight:before, .firebugHighlight:after { content: ""; } .firebugLayoutBoxParent { z-index: 2147483646; position: fixed; background-color: transparent; border-top: 0 none; border-right: 1px dashed #E00 !important; border-bottom: 1px dashed #E00 !important; border-left: 0 none; margin: 0; padding: 0; outline: 0; } .firebugRuler { position: absolute; margin: 0; padding: 0; outline: 0; border: 0 none; } .firebugRuler:before, .firebugRuler:after { content: ""; } .firebugRulerH { top: -15px; left: 0; width