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:ac0a8c5478ec099f9ee2
Created May 7, 2014 18:45
Creating a GIF from an MP4

Crop the video:

ffmpeg -i inputfile.mp4 -aspect 1:1 -r 18.84 -vf "crop=440:440:320:750" outputfile.mp4

Arguments:

  • -aspect (aspect ratio, required or error)
  • -r (framerate, required or error)
  • "crop=440:440:320:750" corresponds to width:height:topleftx:toplefty

Shorten the video:

@derekbrameyer
derekbrameyer / CircularProgressView.java
Created May 7, 2014 18:57
CircularProgressView.java
package com.doomonafireball.samples.android.widget;
import com.doomonafireball.samples.android.R;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
@derekbrameyer
derekbrameyer / attrs.xml
Created May 7, 2014 18:58
CircularProgressView attrs.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="CircularProgressView">
<attr name="cpv__backgroundColor" format="color" />
<attr name="cpv__backgroundColorPressed" format="color" />
<attr name="cpv__animationTime" format="float" />
<attr name="cpv__insideRadius" format="dimension" />
<attr name="cpv__progressWidth" format="dimension" />
</declare-styleable>
</resources>
@derekbrameyer
derekbrameyer / InterceptingScrollView.java
Created June 2, 2014 13:25
InterceptingScrollView, an Android ScrollView to use with SlidingUpPanel.
package com.doomonafireball.demo.android.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ScrollView;
/**
* User: derek Date: 12/7/13 Time: 2:37 PM
*
@derekbrameyer
derekbrameyer / InterceptingListView.java
Last active August 29, 2015 14:02
InterceptingListView, an Android ListView to use with SlidingUpPanel
package com.doomonafireball.demo.android.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ListView;
/**
* User: derek Date: 12/7/13 Time: 2:37 PM
@derekbrameyer
derekbrameyer / truefacts.md
Last active August 29, 2015 14:02
TRUE FACTS ABOUT WHY VIRGINIA IS BETTER THAN MARYLAND

TRUE FACTS ABOUT WHY VIRGINIA IS BETTER THAN MARYLAND

Virginia's total land area is 39,490 square miles. Compare this to Maryland, at a meager 9,707.

Virginia's 2013 population is 8,260,405. Compare this to Maryland, at just 5,928,814.

@derekbrameyer
derekbrameyer / gist:37e4304763e818a60c2e
Created December 11, 2015 21:55
WT White Elephant 2015
Welcome to White Elephant! Please input names line by line. When you are finished inputting names, press enter on a blank line.
Participant name: Erika Cober
Participant name: Kevin Conner
Participant name: Derek Brameyer
Participant name: Jeff Pamer
Participant name: Eric Richardson
Participant name: Andrew Harris
Participant name: Fabian Reddig
Participant name: Hyun-Woo Park