Skip to content

Instantly share code, notes, and snippets.

View mejdi14's full-sized avatar
🇹🇳
native for life

mejdi hafiane mejdi14

🇹🇳
native for life
View GitHub Profile
@markusfisch
markusfisch / README.md
Last active April 8, 2020 00:06
Play nethack while you wait for some process (like a looong build)

Play nethack while you wait for some process

Like a looong build.

Prerequisites

Obviousely you need to have nethack.

Less obviousely, you also need tmux because I use tmux. Sorry ;)

@wasabeef
wasabeef / daily-ktlint.yml
Created September 3, 2019 07:18
Scheduled ktlint with Github Actions
# .github/workflows/daily-ktlint.yml
name: Android CI (Ktlint)
on:
schedule:
# Daily 7am (JST)
- cron: '00 22 * * *'
jobs:
@ntoskrnl
ntoskrnl / KeyboardVisibility.kt
Created August 28, 2017 10:30
Listen to soft keyboard visibility in Android
/**
* Posts true on soft keyboard open, false on close.
* This creates a strong reference to activity instance. Make sure to call ActivitySubscription.dispoose()
* @param visibleThresholdDp if global activity layout changed more than by 100(default) dp
*
* @return activity subscription object that allows to unregister listener
*/
fun Activity.addSoftKeyboardVisibilityListener(
visibleThresholdDp: Int = 100,
initialState: Boolean = false,
@sghael
sghael / colors.xml
Created June 14, 2012 13:43
Android colors.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="white">#FFFFFF</color>
<color name="ivory">#FFFFF0</color>
<color name="light_yellow">#FFFFE0</color>
<color name="yellow">#FFFF00</color>
<color name="snow">#FFFAFA</color>
<color name="floral_white">#FFFAF0</color>
<color name="lemon_chiffon">#FFFACD</color>
<color name="cornsilk">#FFF8DC</color>