Skip to content

Instantly share code, notes, and snippets.

View yuraj11's full-sized avatar

Juraj Novák yuraj11

View GitHub Profile
@yuraj11
yuraj11 / flappy_bird.ino
Created October 15, 2015 13:05
Arduino flappy bird (Nokia 5110 LCD)
//Nokia 5110 LCD
//Preview https://www.youtube.com/watch?v=hSa_eCfRABM
//Uses U8glib https://github.com/olikraus/u8glib
//Written by Yuraj
#include <U8glib.h>
#include <EEPROM.h>
#define PIN_BL 3 //potentiometer for backlight
#define PIN_BL_POT A0 //backlight
@yuraj11
yuraj11 / shared_prefs.java
Last active October 10, 2016 11:00
SharedPrefences json object (and simple caching)
class PrefsJsonHeper {
private final HashMap<String, Object> mJsonObjectCache = new HashMap<>();
private final SharedPreferences mPreferences;
private final Gson mGson;
public PrefsJsonHeper(@NonNull SharedPreferences preferences, @NonNull Gson gson) {
mPreferences = preferences;
mGson = gson;
}