Skip to content

Instantly share code, notes, and snippets.

Is this Slack?

Pablisco pablisco

Is this Slack?
View GitHub Profile
p01 / LICENSE.txt
Last active Jun 15, 2022 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
View LICENSE.txt
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri -
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
wbroek / genymotionwithplay.txt
Last active Jun 2, 2022
Genymotion with Google Play Services for ARM
View genymotionwithplay.txt
NOTE: Easier way is the X86 way, described on
Download the following ZIPs:
ARM Translation Installer v1.1 (
Download the correct GApps for your Android version:
Google Apps for Android 6.0 ( -
Google Apps for Android 5.1 ( -
Google Apps for Android 5.0 ( -
slightfoot /
Last active May 27, 2022
Night Mode Helper - Helps use utilise the night and notnight resource qualifiers without being in car or dock mode.
import java.lang.ref.WeakReference;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.preference.PreferenceManager;
* Night Mode Helper
RIAEvangelist / Install Cloud9 on local or remote computer, server, or raspberry pi
Last active Apr 27, 2022
This gist will help you install Cloud9 on your local or remote computer, server, or even your raspberry pi. Many people are having issues at the time of this Gist's creation.
View Install Cloud9 on local or remote computer, server, or raspberry pi
Complete installation process:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y python-software-properties python make build-essential g++ curl libssl-dev apache2-utils git libxml2-dev
sudo apt-get update
sudo apt-get upgrade
cd ~
mkdir git
cd ~/git
marshall /
Created Feb 22, 2011
A reflection hack to override the APK ClassLoader so you can launch Activities in an external JAR.
// !!WARNING: Not recommended for production code!!
public class ClassLoaderActivity extends Activity
public void onCreate(Bundle savedInstanceState)
// file.jar has a dex'd "classes.dex" entry that you can generate with "dx" from any number of JARs or class files
ClassLoader dexLoader = new DexClassLoader("/path/to/file.jar", getCacheDir().getAbsolutePath(), null, getClassLoader());
artem-zinnatullin /
Last active Jul 18, 2021
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
pedrovgs /
Last active Oct 18, 2019
Interfaces for presenters in MVP are a waste of time!

##Interfaces for presenters in MVP are a waste of time!

It's been a long time since we started talking about MVP. Today, the discussion is about if creating an interface for the Presenter in MVP is needed.

This is the Model View Presenter pattern's schema:

MVP Schema

In this schema the Model box is related to all the code needed to implement your business logic, the presenter is the class implementing the presentation logic and the view is an interface created to abstract the view implementation.

pakoito / lwo.kt
Last active Jan 17, 2018
Lightweight Option
View lwo.kt
inline fun <A, B> A?.fold(crossinline fn: () -> B, crossinline f: (A) -> B): B =
if (this == null) fn() else f(this)
inline fun <A, B> A?.map(crossinline f: (A) -> B): B? = fold({ null }, f)
inline fun <A> A?.orElse(crossinline fn: () -> A): A = fold(fn, { it })