Skip to content

Instantly share code, notes, and snippets.

View krvajal's full-sized avatar
:electron:
What's happening?

Miguel Carvajal krvajal

:electron:
What's happening?
  • @wearesinch
  • Antwerpen, Belgium
View GitHub Profile
@krvajal
krvajal / timer.py
Created June 1, 2016 15:11
timer from python
from timeit import default_timer as timer
start = timer()
# long operation here
duration = timer() - start
print "Duration", duration
@krvajal
krvajal / AndroidContext.java
Created April 10, 2016 16:04
Simple singleton for getting the Android context available anywhere
public final class AndroidContext {
private static Context context;
public static Context getContext() {
return context;
}
public static void setContext(Context context) {
AndroidContext.context = context;
.loading {
background: url(https://a-v2.sndcdn.com/assets/images/loader-db80c5.gif) no-repeat center center;
clear: both;
text-align: center;
height: 40px;
width: 100%;
}