Skip to content

Instantly share code, notes, and snippets.

Ivan Morgillo hamen

Block or report user

Report or block hamen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Run tests with Git Pre-Push hook
CMD="./gradlew clean test"
# Check if we actually have commits to push
commits=`git log @{u}..`
if [ -z "$commits" ]; then
exit 0
if [ $RESULT -ne 0 ]; then
hamen / KeyValueStorage.kt
Created Aug 9, 2018
KeyValueStorage - How to decouple SharedPreferences on Android
View KeyValueStorage.kt
interface KeyValueStorage {
fun getAll(): Map<String, *>
fun contains(key: String): Boolean
fun remove(key: String): Boolean
fun getBoolean(key: String, defaultValue: Boolean): Boolean
fun putBoolean(key: String, value: Boolean): Boolean
hamen /
Created Oct 17, 2017
Display a OSX notification on Gradle start and stop
osascript -e 'display notification "Gradle started." with title "Gradle"'
./gradlew -daemon -PoverrideMinSdk=22 $1
osascript -e 'display notification "Gradle finished." with title "Gradle"'
hamen /
Created Jun 30, 2016 — forked from rock3r/
A simple bash script to enable demo mode on a Marshmallow+ device via ADB (based on
# License for any modification to the original (linked below):
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Sebastiano Poggi wrote this file. As long as you retain
# this notice you can do whatever you want with this stuff. If we meet some day,
# and you think this stuff is worth it, you can buy us a beer in return.
# Based on

Keybase proof

I hereby claim:

  • I am hamen on github.
  • I am ivanmorgillo ( on keybase.
  • I have a public key whose fingerprint is 618F 9A54 DF87 E499 676E E6A1 852F 1BC9 1EC6 94CC

To claim this, I am signing this object:

hamen /
Last active May 13, 2016
Utility placeholder strings
public class MockStrings {
public static final String s
= "Non si intrometta! No, aspetti, mi porga l'indice; ecco lo alzi così... guardi, guardi, guardi; lo vede il dito? Lo vede che stuzzica, che prematura anche. E lei.. cosa si sente? Professore, non le dico. Antani come trazione per due anche se fosse supercazzola bitumata, ha lo scappellamento a destra.";
public static final String m
= "Ma che antifurto, mi faccia il piacere! Questi signori qui stavano sonando loro. Sorella? Eh!? Col tarapia tapioco come se fosse la supercazzola per lei. Voglio il cappellano, il cappellano! Ho visto la Madonna! Non si intrometta!No, aspetti, mi porga l'indice; ecco lo alzi così... guardi, guardi, guardi; lo vede il dito? Lo vede che stuzzica, che prematura anche.";
public static final String l
= "Ah, pardon. Tarapio tapioco come se fosse Antani, la supercazzola prematurata con dominus reveriscum blinda. Come, prego? Tarapio sulla supercazzola con scappellamento destro o
hamen / gist:9fcb2c2fae8892172320
Last active Oct 6, 2019
Raspberry Pi T Cobbler GPIO Extension Board v2.2 PINs
View gist:9fcb2c2fae8892172320
ExtB -> GPIO
P0 = 17
P1 = 18
P2 = 27
P3 = 22
P4 = 23
P5 = 24
P6 = 25
P7 = 4
View Ubiquity command
// This is just a customization of original Twitter Ubiquity command by Mozilla
// I just replaced some strings. For credits refer to
names: ["", "share using"],
arguments: [
{role: "object", label: 'status', nountype: noun_arb_text},
{role: "alias", nountype: noun_type_twitter_user}
View devmo
name: "devmo",
description: "Search for your words",
author: {name: "Ivan Morgillo", email: "imorgillo [at] sanniolug [dot] org"},
homepage: "",
license: "GPL v3",
url: "{QUERY}&type=fulltext",
parser: {container: "div#searchResults > ul > li", title: "div.title > a + a", preview: "div.searchpreview"
View Bing search command
author: {name: "Ivan Morgillo", email: "imorgillo [at] sanniolug [dot] org"},
homepage: "",
license: "GPL v3",
description: "Search Bing for your words",
name: "bing",
url: "{QUERY}&form=QBLH&filt=all",
parser: {container: "div#results > ul.sb_results > li",
title: "div.sb_tlst h3",
preview: "p"}
You can’t perform that action at this time.