Skip to content

Instantly share code, notes, and snippets.

View quentin23soleil's full-sized avatar

Quentin Dommerc quentin23soleil

View GitHub Profile

This is the gist which explains how to use Android predictive back gesture and iOS swipe to go back when using Voyager in Compose multiplatform.

If you are just using Android, you can merge the commonMain stuff and the androidMain stuff.

#!/bin/bash
today=$(date +"%Y-%m-%d-%H-%M-%S")
image=~/android-screenshot/$today.png
echo $image
~/Library/Android/sdk/platform-tools/adb exec-out screencap -p > "~/android-screenshot/${today}.png"
osascript -e 'set the clipboard to (read (POSIX file "'$image'") as JPEG picture)'
echo "✅ copied to clipboard"
@quentin23soleil
quentin23soleil / cannelesrecipe.md
Last active November 15, 2021 09:16
Cannelés recipe

Cannelés Recipe

(original recipe - I adapted some things - in french here)

With this recipe I'm making around 22/24 "big" cannelés (see this tweet for picture)

Ingredients

1 liter of fresh whole milk (lait frais entier) 2 eggs 4 egg yolks

### Keybase proof
I hereby claim:
* I am quentin23soleil on github.
* I am quentindommerc (https://keybase.io/quentindommerc) on keybase.
* I have a public key ASBuuQDZR8lFB2MSY08vYmN7kAHxblAlbtQBqyg3ssaEiwo
To claim this, I am signing this object:
@quentin23soleil
quentin23soleil / gist:4a70b440c952436b3fea03f7ec8e9e07
Created August 7, 2016 16:58 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@quentin23soleil
quentin23soleil / screen.sh
Created August 7, 2015 09:28
Take screenshot with demo mode on Android
#!/bin/bash
adb=your/android/sdk/path/platform-tools/adb
folder=.
$adb shell am broadcast -a com.android.systemui.demo --es command enter
$adb shell am broadcast -a com.android.systemui.demo --es command clock --es hhmm 0520
$adb shell am broadcast -a com.android.systemui.demo --es command battery --es level 100 --es plugged false
$adb shell am broadcast -a com.android.systemui.demo --es command network \
--es mobile show \
--es fully true \
@quentin23soleil
quentin23soleil / share package names
Last active August 29, 2015 14:15
All share package names I could find. Tell me about others.
String[] twitter = new String[] {
"com.klinker.android.twitter_l",
"org.mariotaku.twidere",
"com.levelup.touiteur",
"jp.r246.twicca",
"com.jv.materialfalcon",
"com.twitter.android",
"com.handmark.tweetcaster",
"it.mvilla.android.fenix",
"com.handmark.tweetcaster.premium",
08-06 17:28:09.528: E/SQLiteLog(26897): (14) cannot open file at line 30191 of [00bb9c9ce4]
08-06 17:28:09.528: E/SQLiteLog(26897): (14) os_unix.c:30191: (24) open(/data/data/com.jv.falcon.pro/databases/tweets.db-journal) -
08-06 17:28:09.528: E/SQLiteLog(26897): (14) cannot open file at line 30191 of [00bb9c9ce4]
08-06 17:28:09.528: E/SQLiteLog(26897): (14) os_unix.c:30191: (24) open(/data/data/com.jv.falcon.pro/databases/tweets.db-journal) -
08-06 17:28:09.528: E/SQLiteLog(26897): (14) statement aborts at 156: [SELECT * FROM tweets WHERE (user = "kentin_dommerc" AND mention= 0 AND dm= 0 ) AND (pubdate > 1375716489534 AND content IS NULL AND img LIKE 'http%' AND (( fromUser = ? ) OR fav = 1))
08-06 17:28:09.528: E/SQLiteQuery(26897): exception: unable to open database file (code 14); query: SELECT * FROM tweets WHERE (user = "kentin_dommerc" AND mention= 0 AND dm= 0 ) AND (pubdate > 1375716489534 AND content IS NULL AND img LIKE 'http%' AND (( fromUser = ? ) OR fav = 1)) ORDER BY pubdate DESC LIMIT 200
08-
06-26 19:50:19.241: E/AndroidRuntime(19949): FATAL EXCEPTION: main
06-26 19:50:19.241: E/AndroidRuntime(19949): java.lang.IllegalStateException: No tab known for tag null
06-26 19:50:19.241: E/AndroidRuntime(19949): at android.support.v4.app.FragmentTabHost.doTabChanged(FragmentTabHost.java:326)
06-26 19:50:19.241: E/AndroidRuntime(19949): at android.support.v4.app.FragmentTabHost.onAttachedToWindow(FragmentTabHost.java:276)
06-26 19:50:19.241: E/AndroidRuntime(19949): at android.view.View.dispatchAttachedToWindow(View.java:11944)
06-26 19:50:19.241: E/AndroidRuntime(19949): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2415)
06-26 19:50:19.241: E/AndroidRuntime(19949): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2422)
06-26 19:50:19.241: E/AndroidRuntime(19949): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2422)
06-26 19:50:19.241: E/AndroidRuntime(19949): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2422)
06-26 19:50
package com.pariscope.ui.activities;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.os.Bundle;
import android.support.v4.app.FragmentTabHost;
import com.google.android.gms.maps.GoogleMap;