Skip to content

Instantly share code, notes, and snippets.

View derekbrameyer's full-sized avatar

Derek Brameyer derekbrameyer

  • WillowTree Inc.
  • Durham, NC
View GitHub Profile
@derekbrameyer
derekbrameyer / gist:8390664
Created January 12, 2014 21:10
1/12/14 We Kicked That Ball Press Release

We Kicked That Ball Blanks C'ville Brunch Ballers in 12-0 Victory

*** FOR IMMEDIATE RELEASE ***

Charlottesville, VA -- Nine different players scored runs in today's 12-0 shutout by We Kicked That Ball (WKTB) against the visiting C'ville Brunch Ballers (CBB). The team moves to an undefeated 2-0 on the season, with no losses, a 100% win rate, zero ties, no dropped games,and two victories. "Total team effort," said relief pitcher Blake Ware following the game. "We had a lot of people out there making plays today." First baseman Mike Silverman echoed Ware's sentiments: "A lot of good chemistry today. Kayla [Leavesley] especially."

WKTB's offense today was varied, mixing in several key bunts to advance runners into scoring position. Catcher/second baseman/right fielder Kayla Leavesley opened scoring in the first inning and outfielder Trung Tran followed. Leavesley's performance today should pay big dividends for fantasy indoor kickball owners who picked her up following last week's advice. Tra

@derekbrameyer
derekbrameyer / gist:8359350
Last active January 2, 2016 20:49
1/8/14 We Kicked That Ball Press Release

We Kicked That Ball Opens Season With 4-1 Victory Over Rivals Here 4 Beer

*** FOR IMMEDIATE RELEASE ***

Charlottesville, VA -- Atop breakout performances by pitcher Blake Ware and first baseman Mike Silverman, We Kicked That Ball (WKTB) opened the Winter 2014 indoor kickball season with a 4-1 win playing away at conference rivals Here 4 Beer. The team is thrilled with their victory and looking forward to their next game against out-of-conference foe C'Ville Brunch Ballers, this Sunday at 12:00 PM. WKTB moves to an undefeated 1-0 on the season with a 100% win rate and no losses, and notches a crucial victory in conference play.

WKTB opened the game with three runs in the first inning, quickly quieting the 5-person crowd, and never looked back. Their defense was dominant throughout, allowing just one run and handing Here 4 Beer a smattering of quick three-out innings. Infield defense had an especially standout performance, with the front three of pitcher Blake Ware, first baseman Mike Silverman

@derekbrameyer
derekbrameyer / gist:6891069
Last active December 25, 2015 00:49
Android .gitignore
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
@derekbrameyer
derekbrameyer / PagerSlidingTabStrip.java
Created June 17, 2013 23:24
Usage of tab background selector state and a ColorStateList for astuetz's PagerSlidingTabStrip
/*
* Copyright (C) 2013 Andreas Stuetz <[email protected]>
*
* 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
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
super.onScroll(view, firstVisibleItem, visibleItemCount, totalItemCount);
if (view.getChildAt(0) != null) {
View header = view.getChildAt(0).findViewById(R.id.header);
if (header != null && header.getVisibility() == View.VISIBLE) {
header.setVisibility(View.INVISIBLE);
}
@derekbrameyer
derekbrameyer / gist:4253522
Created December 10, 2012 21:20
Zero to Android Deploy

1. Install Android SDKs

  • Navigate to http://developer.android.com/sdk/index.html#ExistingIDE
  • "Download the SDK Tools for Mac"
  • Copy the android-sdk-macosx directory to your Home directory.
  • Navigate to android-sdk-macosx/tools and execute android
  • You may need to allow Gatekeeper to install from anywhere
    • Settings --> Security & Privacy --> "Allow applications downloaded from: Anywhere"
  • When opening android, if you do not have a Java Runtime, OS X will download it for you (you'll have to relaunch android once the runtime is installed)
  • Check off the following packages:
    • Android SDK Platform-tools (Rev. 16)
ERROR/AndroidRuntime(18114): FATAL EXCEPTION: AsyncTask #3
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:299)
at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
<style name="Fill">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">fill_parent</item>
</style>
<style name="Wrap">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>
<style name="FillHeight" parent="Fill">
@derekbrameyer
derekbrameyer / gist:1838185
Created February 15, 2012 19:02
Funky Glyphs or Characters in custom font ellipsized ellipsize TextView
Look like this? http://imgur.com/yHYXI
The issue is that the 'ZERO WIDTH NO-BREAK SPACE' (U+FEFF) character is missing from your font!
I used FontForge (free, etc.) to replace the character with the Droid Sans character. It was a pretty simple process, just find the glyph (it's towards the bottom hint hint), copy from Droid Sans, open the other font, and then paste it in the appropriate spot. Then generate whatever font type you're using.
@derekbrameyer
derekbrameyer / gist:1836976
Created February 15, 2012 16:13
Adding a .jar to our internal repo
Make sure you've set up your .m2/settings.xml with appropriate creds:
mvn deploy:deploy-file -Dfile=path/to/jarfile.jar -DgroupId=com.blah.blah -DartifactId=artifactname -Dversion=x.x.x -Dpackaging=jar -DrepositoryId=wta.internal -Durl=http://maven.willowtreeapps.com/
Try to follow the .jar's package naming convention. For example, I did this for Urban Airship:
mvn deploy:deploy-file -Dfile=urbanairship-lib-1.0.7.jar -DgroupId=com.urbanairship.android -DartifactId=urbanairship-lib -Dversion=1.0.7 -Dpackaging=jar -DrepositoryId=wta.internal -Durl=http://maven.willowtreeapps.com/