Skip to content

Instantly share code, notes, and snippets.

View letroll's full-sized avatar

Julien Quiévreux letroll

View GitHub Profile
@letroll
letroll / text
Last active October 29, 2024 18:54
[Réécriture de branche avec Git] Comment ré-écrire sa branche #git #force
#écraser une branche distante avec la branche locale
créér une branche temporaire avec les corrections : git chechout -b branchetmp
faire les fix
vérifier que l'on est sur la bonne branche temp
git push -f origin branchetmp:nomDeLaBrancheàEcraser
#supprimer des commits non voulu
@letroll
letroll / shell.sh
Last active September 25, 2024 08:41
[git config] My own git config #git #command #configuration
git config --global push.autoSetupRemote true

CD to a folder like:

mkdir $HOME/Desktop/Backup_Arduino
cd $HOME/Desktop/Backup_Arduino

Set these variables

Arduino Nano Old Bootloader:

@letroll
letroll / aquara_remote_switch_single_rocker.yaml
Last active January 4, 2022 22:00
Aquara remote switch single rocker home assistant blueprint zha
blueprint:
name: Aquara remote switch single rocker
description: Automate the Aquara remote switch single rocker with zha
domain: automation
input:
aquara_remote_switch_single_rocker:
name: Aquara remote switch single rocker
selector:
device:
integration: zha
@letroll
letroll / bash_rc
Last active January 15, 2021 13:27
[log sharedpreference] log current application shared preference #android #adb #log #preference
function logPackageName() {
adb shell dumpsys activity recents | grep 'Recent #0' | cut -d= -f2 | sed 's| .*||' | cut -d '/' -f1
}
function logpref() {
APP_ID=$(logPackageName)
echo "current packageName:$APP_ID"
SHARED_PREF_FILES=$(adb shell "run-as $APP_ID ls /data/data/${APP_ID}/shared_prefs/")
SHARED_PREF_FILE=${SHARED_PREF_FILE[0]}
echo "current preference file:$SHARED_PREF_FILE"
@letroll
letroll / passwd.sh
Created December 8, 2020 08:21
[changement de mot de passe] changement de mot de passe dans une liste de fichier #password #bash #script #proxy
function replaceDas(){
file_list=(
/c/Users/UserName/.leptonrc
)
search=${1}
replace=${2}
echo "replace $search to $replace"
echo "in"
for filename in "${file_list[@]}";
do
@letroll
letroll / readme.md
Last active November 26, 2020 09:12
[Ma config Android Studio] liste des plugins, paramètre non par défaut, etc. #android #android_studio #plugin

#plugin

  • Acejump
  • Auto filling Java Call arguments
  • Hadouken progress bar
  • IdeaVim
  • Key promoter x
  • string manipulation

#configuration ide

@letroll
letroll / getDeviceInfos.sh
Created October 6, 2020 13:26
[android device information] get android device information with adb
#adb shell getprop gsm.baseband.imei
#adb shell "service call iphonesubinfo 1 | cut -c 52-66 | tr -d '.[:space:]'"
#!/bin/bash
# Get the device properties
adb shell getprop | grep "model\|version.sdk\|manufacturer\|ro.serialno\|product.name\|brand\|version.release\|build.id\|security_patch" | sed 's/ro\.//g'
# get the device ime
echo "[device.imei]: [$(adb shell service call iphonesubinfo 1 | awk -F "'" '{print $2}' | sed '1 d'| tr -d '\n' | tr -d '.' | tr -d ' ')]"
# get the device phone number
echo "[device.phonenumber]: [$(adb shell service call iphonesubinfo 19 | awk -F "'" '{print $2}' | sed '1 d'| tr -d '\n' | tr -d '.' | tr -d ' ')]"
.pv : instantiate private val
ANY → $expr$ $expr$= new $expr$();
@letroll
letroll / shell.sh
Created March 12, 2020 09:37
[Android ADB Broadcast] send broadcast from adb #adb #android #broadcast
adb shell am broadcast -a com.whereismywifeserver.intent.TEST
[-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...]
[--esn <EXTRA_KEY> ...]
[--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...]
[--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...]
[--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...]
[--ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE> ...]
[--eu <EXTRA_KEY> <EXTRA_URI_VALUE> ...]
[--ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>]