Skip to content

Instantly share code, notes, and snippets.

View letroll's full-sized avatar

Julien Quiévreux letroll

View GitHub Profile
@letroll
letroll / script.sh
Last active December 3, 2020 10:41
[adb input] possible input with adb #adb #input #command #line #shell
https://technastic.com/adb-shell-commands-list/
#Insert text (obs: %s means SPACE)
adb shell input text "insert%syour%stext%shere"
#Event codes (82 ---> MENU_BUTTON)
adb shell input keyevent 82
#Tap X,Y position (Settings > Developer Options > Check the option POINTER SLOCATION)
adb shell input tap 500 1450
@letroll
letroll / bash.sh
Created July 9, 2019 08:39
[android keystore creation] create android keystore and alias #android #keystore #alias #certificate
Generate Keystores
To generate keystores for signing Android apps at the command line, use:
$ keytool -genkey -v -keystore my-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
A debug keystore which is used to sign an Android app during development needs a specific alias and password combination as dictated by Google. To create a debug keystore, use:
$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
Keystore name: "debug.keystore"
@letroll
letroll / bash.sh
Created May 5, 2019 16:07
[create htaccess]create htaccess #htaccess #password
sudo htpasswd -c .htpasswd username
@letroll
letroll / bash.sh
Created May 4, 2019 20:24
[remove file which filename containing "toto" (recursive)] remove file with filename filter #shell #rm #filter
find . -name "*toto*" -exec rm -f '{}' +
@letroll
letroll / ConditionalDivider.kt
Created March 18, 2019 09:15
[ConditionalDivider] an recyclerview for LinearLayoutManager which support conditional drawing #divider #conditional #recyclerview #android
/**
* ConditionalDivider is a [RecyclerView.ItemDecoration] that can be used as a divider
* between items of a [LinearLayoutManager]. It supports both [.HORIZONTAL] and
* [.VERTICAL] orientations.
*
* <pre>
* dividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(),
* mLayoutManager.getOrientation());
* recyclerView.addItemDecoration(dividerItemDecoration);
</pre> *
@letroll
letroll / bash.sh
Last active April 12, 2018 17:19
[scanner les hosts sur le réseau] Scanner les adresses ip des hosts connectés #nmap #bash #command #network
nmap -sP 192.168.1.0/24
@letroll
letroll / bash.sh
Last active April 10, 2018 19:37
[xcode select] selection de la version d'Xcode à utiliser #xcode #version #bash #command
//selection la version indiqué
sudo xcode-select -switch /Users/JOHN/Downloads/Xcode45-DP3.app
//affiche le chemin de la version en cours d'utilisation
xcode-select --print-path
@letroll
letroll / bash.sh
Created February 5, 2018 08:46
[être notifié des connexions/déconnexions adb] Comment faire en bash pour être notifier des connexions <-> déconnexions d'appareils Android #adb #android #bash #netcat
pour être notifié des connexions/déconnexions adb sans poller `adb devices`, on peut parler avec le démon directement :
```netcat localhost 5037 <<< 0012host:track-devices
```
(pratique pour effectuer une action dès qu'un nouveau device est connecté

Keybase proof

I hereby claim:

  • I am letroll on github.
  • I am letroll (https://keybase.io/letroll) on keybase.
  • I have a public key ASADHdJ2ZGYNbrAqjwxgzyA9Mw9k5NqjELRy0RNc20DBEwo

To claim this, I am signing this object:

@letroll
letroll / help.md
Created August 9, 2017 09:34
[Give write permissions to multiple users on a folder in unix]Give write permissions to multiple users on a folder in unix #permission #write #unix #shell

Users in Linux can belong to more than one group. In this case you want to create a brand new group, let's call it tomandruser:

sudo groupadd tomandruser Now that the group exists, add the two users to it:

sudo usermod -a -G tomandruser tomcat6 sudo usermod -a -G tomandruser ruser Now all that's left is to set the permissions on the directory:

sudo chgrp -R tomandruser /path/to/the/directory