Skip to content

Instantly share code, notes, and snippets.

View fmedlin's full-sized avatar

Fred Medlin fmedlin

View GitHub Profile
#include <stdio.h>
int main (int argc, char** argv)
{
printf("How do I delete gists?\n");
}
@fmedlin
fmedlin / gist:11190166
Created April 22, 2014 18:48
TypedInput test example
private RetrofitError emailLookup404Error() {
ApiResponse apiResponse = new ApiResponse();
apiResponse.message = "Email not found";
apiResponse.next_screen = "apply";
return RetrofitError.httpError("http://example.org",
new Response(HttpStatus.SC_NOT_FOUND,
"emailLookup404Error_test",
new ArrayList<Header>(),
new TypedString(new Gson().toJson(apiResponse))),

Keybase proof

I hereby claim:

  • I am fmedlin on github.
  • I am fredmedlin (https://keybase.io/fredmedlin) on keybase.
  • I have a public key whose fingerprint is B031 6162 1976 A9EB BCC8 0273 23C2 F37B 36C8 2C16

To claim this, I am signing this object:

/*
* Copyright (C) 2013 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@fmedlin
fmedlin / gist:f85c90abf82c7182344f
Created March 3, 2015 02:20
Layout helper for modifying touchable area of a view
/**
* Adjust the touchable area of a view.
*/
public static void LayoutHelper adjustTouchableArea(View view, View parent, TouchDelegateSizer sizer) {
parent.post(new Runnable() {
@Override
public void run() {
Rect r = new Rect();
view.getHitRect(r);
parent.setTouchDelegate(new TouchDelegate(sizer.adjustTouchableArea(r), view));
@fmedlin
fmedlin / Java system properties.java
Created December 11, 2008 14:17
Java system properties
/*
System.getProperty()
Key Description of Associated Value
java.version Java Runtime Environment version
java.vendor Java Runtime Environment vendor
java.vendor.url Java vendor URL
java.home Java installation directory
java.vm.specification.version Java Virtual Machine specification version
@fmedlin
fmedlin / robomake.rb
Created May 8, 2010 03:58
A script to watch and rebuild Android NDK projects
#! /usr/bin/ruby
# A script to watch files and build Android NDK projects
interrupted = false
trap("INT") { interrupted = true }
def print_separator
puts "============================================="
end
describe Preferences, "what I'd rather have" do
it "should be a bottle in front of me" do
end
it "should not be a frontal lobotomy" do
end
end
describe Truck, "while in possession" do
describe Preferences, "what I'd rather have" do
it "should be a bottle in front of me" do
end
it "should not be a frontal lobotomy" do
end
end