Skip to content

Instantly share code, notes, and snippets.


Anton Shkurenko tonyshkurenko

View GitHub Profile
tonyshkurenko / preprocessor_fun.h
Last active Aug 28, 2015 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
View preprocessor_fun.h
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
tonyshkurenko /
Last active Aug 29, 2015 — forked from artem-zinnatullin/
If you need to set one font for all TextViews in android application you can use this solution. It will override ALL TextView's typefaces, includes action bar and other standard components, but EditText's password font won't be overriden.
public class MyApp extends Application {
public void onCreate() {
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf
tonyshkurenko / underscore
Created Jul 18, 2015
Underscore drawable
View underscore
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="">
<item android:top="-6dp" android:left="-6dp" android:right="-6dp">
<solid android:color="#2b7996"/>
<stroke android:color="#33b5e5" android:width="6dp"/>
View Adapter
package com.phempto.ui.home.adapter;
import com.phempto.ui.home.fragment.BaseFragment;
import com.phempto.ui.home.fragment.HomeFragment;
import com.viewpagerindicator.IconPagerAdapter;
View Beacon Parser Layout
//bytes array will be something like 0201061aff4c000215a33c91
//we need symbols on "4c00" position
//for black Stick'n'find beacons:
beaconManager.getBeaconParsers().add(new BeaconParser()
//for white beacons
beaconManager.getBeaconParsers().add(new BeaconParser()
You can’t perform that action at this time.