Skip to content

Instantly share code, notes, and snippets.

View koalahamlet's full-sized avatar
㊙️
shhhh

Myko Huff koalahamlet

㊙️
shhhh
View GitHub Profile
@rfong
rfong / slinky_video.py
Last active February 3, 2017 19:27
Turn yourself into a slinky by time-delaying successive chunks of a webcam capture with OpenCV! https://vimeo.com/183155228
import copy
import datetime
import numpy as np
from optparse import OptionParser
import time
import cv2
from matplotlib import pyplot as plt
@jonfhancock
jonfhancock / ChangeStrictMode.java
Created June 14, 2016 16:12
This method can be called by your Application class onCreate(), or even your first Activity. After that, for debug builds only, you can manipulate StrictMode settings at any time without inconveniencing your QA team.
/**
* For debug builds, this adds the ability to set up StrictMode on the fly via the command line with a command like
* adb shell am broadcast -a com.your.pakcage.action_change_strict_mode --ez enabled true --esa penalties log\,flash\,death
*/
private void setupStrictModeReceiver() {
if (BuildConfig.DEBUG) {
final String tag = "StrictModeReceiver";
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("com.your.package.action_change_strict_mode");
registerReceiver(new BroadcastReceiver() {
@nidhi1608
nidhi1608 / hacking_in_a_material_world.md
Last active July 6, 2019 09:34
Android workshop on material design

Hacking in a material world

Challenge

We will be playing with android's gorgeous new Material Design theme. We will be covering the following material widgets and animations that were introduced in Android 5.0 (API level 21).

@eveliotc
eveliotc / MyActivityOrFragment.java
Created July 29, 2013 15:38
A variant of https://gist.github.com/eveliotc/6051367 to show a drop shadow, should not be used for performance in mind views
final ImageView imageView = (ImageView) view.findViewById(R.id.image);
final int shadowSize = getResources().getDimensionPixelSize(R.dimen.shadow_size);
final int shadowColor = getResources().getColor(R.color.shadow_color);
imageView.setImageDrawable(new RoundedAvatarDrawable(mBitmap, shadowSize, shadowColor));
if (SDK_INT >= HONEYCOMB) {
imageView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
@jamiechapman
jamiechapman / ParseProxyObject.java
Last active March 14, 2019 07:37
A Parse.com Serializable ParseObject Proxy
// By Jamie Chapman, @chappers57
// License: open, do as you wish, just don't blame me if stuff breaks ;-)
public class ParseProxyObject implements Serializable {
private static final long serialVersionUID = 1L;
private HashMap<String, Object> values = new HashMap<String, Object>();
public HashMap<String, Object> getValues() {
return values;
@arvearve
arvearve / gist:4158578
Created November 28, 2012 02:01
Mathematics: What do grad students in math do all day?

Mathematics: What do grad students in math do all day?

by Yasha Berchenko-Kogan

A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.

The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.

What can you say?