CheatFlow

Personal dev command flow

Git

43 commands from your notes

1

Setup & Init

3 items
git init

Initialize a new repository.

git clone <url>

Copy an existing repository.

git clone https://github.com/user/repo.git

.gitignore

Ignore files and folders such as node_modules or .env.

node_modules/, .env

2

Track Changes

9 items
git status

Show repository status.

git status --short

Show a compact, script-friendly summary of staged, modified, and untracked files.

git add <file>

Stage one or more files.

git add index.js / git add .

git commit -m "msg"

Save staged changes.

git commit -m "Init project"

git diff

Show file differences.

git diff / git diff --staged

git diff --stat

Summarize changed files and show how many lines were added or removed without printing the full diff.

git diff -- . ":(exclude)package-lock.json"

Show the working-tree diff for the current path while excluding package-lock.json.

git commit --amend

Modify the most recent commit message or contents.

git commit --amend --no-edit

Add staged changes to the last commit without changing its message.

3

Branching & Merging

10 items
git branch

List branches.

git branch --show-current

Print only the name of the currently checked-out branch.

git branch <name>

Create a branch.

git branch feature-x

git checkout <branch>

Switch to another branch.

git checkout main

git merge <branch>

Merge a branch into the current branch.

git merge feature-x

git rebase <branch>

Reapply commits on another base.

git rebase main

git branch -d <branch>

Delete a local branch only if it is fully merged.

git branch -d feature/login

git push origin --delete <branch>

Remove a branch from the remote repository.

git push origin --delete feature/login

git branch -D <branch>

Delete a local branch even if it is not merged.

git branch -D feature/login

git push origin :<branch>

Force-delete a remote branch.

git push origin :feature/login

4

Remote Work

6 items
git remote add <name> <url>

Link the repository to a remote.

git remote add origin https://github.com/user/repo.git

git push <remote> <branch>

Upload commits to a remote branch.

git push origin main

git push origin v0.10.0

Push a local version tag to origin after creating it with git tag.

git tag v0.10.0

git pull <remote> <branch>

Fetch and merge from a remote branch.

git pull origin main

git fetch

Download remote changes without merging.

git fetch origin

git diff main origin/main

Compare local main with the remote main branch after fetching.

5

Undo / Fix

7 items
git reset --soft HEAD~1

Undo the last commit but keep all changes staged.

git reset --hard HEAD~1

Undo a commit and discard changes.

git revert <commit>

Create a new commit that reverses another commit.

git revert a1b2c3d

git restore <file>

Discard local file changes.

git restore index.js

git rm <file>

Remove a file and stage the deletion.

git rm old.txt

git clean -f

Remove untracked files.

git commit --amend

Fix or update the most recent commit.

6

Inspect & Log

7 items
git log

View commit history.

git log --oneline

git log --oneline

Show a compact one-line commit log.

git log --graph

Show the branch graph.

git log --graph --decorate

git status

View staged and unstaged files.

git show <commit>

Show commit details.

git show a1b2c3d

git blame <file>

Show who changed each line.

git blame index.js

git rm --cached <file>

Stop tracking a file while keeping it on disk.

echo <file> >> .gitignore echo secrets.env >> .gitignore

7

Most Common Workflow

1 items
git status git add . git commit -m "message" git push origin main

Most common daily workflow.

Expo

27 commands from your notes

1

Project setup / config

9 items

Expo clean build sequence

Use when dependencies are stale, native files changed, or release builds behave strangely.

1rm -rf node_modules package-lock.json

Remove old dependencies and the npm lock file.

2npx expo prebuild --platform android --clean

Regenerate native Android files from Expo config.

3cd android

Move into the Android project before Gradle commands.

4./gradlew clean

Clear stale Gradle build outputs.

5./gradlew assembleRelease

Build the release APK.

npx expo init <project>

Create a new Expo project.

npx expo eject

Eject the project to the bare workflow.

npx expo prebuild

Generate native Android and iOS projects from package.json and app config.

npx expo doctor

Check the project for issues.

npx expo install <package>

Install an Expo-compatible package version.

rm -rf node_modules package-lock.json

Remove old dependencies and the npm lock file before a fresh install.

app.json

Static JSON config with fixed values; good for simple Expo configs.

app.config.js

JavaScript config that can compute values, read env variables, and change by platform.

EXPO_PUBLIC_FIREBASE_API_KEY=xxxx

Expose safe public values to Expo through environment variables.

const firebaseConfig = { apiKey: process.env.EXPO_PUBLIC_FIREBASE_API_KEY, };

2

Development

5 items
npx expo start

Start the Metro bundler development server.

npx expo start --dev-client

Start Metro for a custom development client.

npx expo run:android

Build and run on an Android device or emulator.

npx expo run:android --variant release

Create a local production Android build without Metro.

npx expo run:ios

Build and run on an iOS simulator or device.

3

Build / Publish

4 items
npx eas build --platform android

Build an APK or AAB using EAS.

npx eas build --platform ios

Build an IPA using EAS.

npx eas submit --platform android

Submit an Android build to the Play Store.

npx eas submit --platform ios

Submit an iOS build to the App Store.

4

Assets / Updates

5 items
npx expo prebuild --platform android --clean

Regenerate the Android native project from Expo config.

npx expo prebuild --clean

Rebuild native projects from scratch.

npx expo export

Export a production bundle.

npx expo publish

Publish a JavaScript bundle over the air.

npx expo optimize

Optimize images in the project.

5

Other / Misc

4 items
npx expo config

Show the Expo config.

npx expo whoami

Show the logged-in Expo user.

npx expo logout / npx expo login

Manage the Expo account session.

npx expo upgrade

Upgrade the Expo SDK.

Android Build

26 commands from your notes

1

Project tasks

3 items
./gradlew tasks

List all available Gradle tasks.

./gradlew properties

Show project properties.

./gradlew dependencies

Show the dependency tree.

2

Build tasks

7 items
./gradlew assembleDebug

Build a debug APK.

./gradlew assembleRelease

Build a release APK.

./gradlew build

Run a full build for debug and release outputs.

./gradlew clean

Clean build outputs.

./gradlew cleanBuildCache

Clear the Gradle build cache.

cd android & gradlew assembleRelease

Windows command prompt shortcut for building the release APK from the project root.

cd android && ./gradlew assembleRelease --no-daemon

Linux shell command for building release APK without a Gradle daemon.

3

Install/Run tasks

3 items
./gradlew installDebug

Install the debug APK on a connected device.

./gradlew installRelease

Install the release APK on a connected device.

./gradlew run

Run the project when the setup supports it.

4

Test tasks

2 items
./gradlew test

Run unit tests.

./gradlew connectedAndroidTest

Run instrumented tests on a connected device or emulator.

5

Native/CMake tasks

3 items
./gradlew externalNativeBuildDebug

Build native libraries for debug.

./gradlew externalNativeBuildRelease

Build native libraries for release.

./gradlew cleanExternalNativeBuild

Clean native build outputs when supported by the setup.

6

Advanced/debugging

8 items
./gradlew build --stacktrace

Show detailed stack traces for build failures.

ps aux | grep gradle

Find running Gradle processes on Linux.

kill -9 <gradle_process_id>

Force-stop a stuck Gradle process.

./gradlew build --info

Show verbose build output.

./gradlew build --debug

Show full debug logs with very detailed build output.

./gradlew build --warning-mode all

Show all Gradle warnings.

--warning-mode summary | all | none | fail

Available Gradle warning modes; summary is the default.

org.gradle.warning.mode=all

Persist full Gradle warnings in android/gradle.properties.

X:/projectDir/android/gradle.properties

ADB

22 commands from your notes

1

Device Management & Setup

4 items
adb devices -l

List connected devices with details.

adb connect <IP>:5555

Connect to a device over Wi-Fi after USB setup.

adb connect 192.168.1.10:5555

adb forward tcp:<LP> tcp:<DP>

Redirect a port from the PC to the device for network traffic.

adb forward tcp:8081 tcp:8081

adb reboot [mode]

Reboot the device; use bootloader or recovery for modes.

adb reboot recovery

2

App Installation & Data

5 items
adb install -r <path/to/app.apk>

Reinstall an app while keeping existing data.

adb install -r latest.apk

adb uninstall -k <package.name>

Uninstall an app while keeping app data and cache.

adb uninstall -k com.myapp

adb shell pm clear <package.name>

Delete all app data like Clear Storage.

adb shell pm clear com.myapp

adb shell pm grant <package> <perm>

Grant a runtime permission instantly.

adb shell pm grant com.myapp CAMERA

adb shell pm disable-user --user 0 <pkg>

Disable a system app for the current user.

adb shell pm disable-user --user 0 com.bixby

3

Logging & Crash Analysis (Logcat)

5 items
adb logcat -c

Clear the entire log buffer.

adb logcat -c

adb logcat -v color

Display logs in colorized format.

adb logcat -v color

adb logcat *:E

Filter for all errors and crashes.

adb logcat *:E

adb logcat -b crash -d

Dump the dedicated crash buffer and exit.

adb logcat -b crash -d

adb logcat "TAG:I *:S"

Isolate a specific tag and silence all others.

adb logcat "RNJS:I *:S"

4

Shell Interaction & Remote Control

8 items
adb shell

Open an interactive terminal on the device.

adb shell

adb shell dumpsys activity top

Find the package name of the foreground app.

adb shell dumpsys activity top

adb shell am start -n <pkg/.Activity>

Launch a specific activity or app component.

adb shell am start -n com.myapp/.HomeActivity

adb shell input keyevent 3

Simulate a key press; 3 is HOME and 4 is BACK.

adb shell input keyevent 3

adb shell input text "hi"

Send simulated text input to the focused field.

adb shell input text "TestMessage"

adb shell settings put global <key> <val>

Modify system settings, such as disabling animations.

adb shell settings put global window_animation_scale 0.0

adb shell screenrecord /sdcard/v.mp4

Record screen video; use Ctrl+C to stop.

adb shell screenrecord /sdcard/demo.mp4

adb shell screencap -p > file.png

Take a screenshot and save it directly to the PC.

adb shell screencap -p > capture.png

Arch

45 commands from your notes

1

Disk & System Inspection

7 items
sudo parted /dev/nvme0n1

Open parted to inspect the target NVMe disk.

print free

Show free space from inside parted.

lsblk

Show block devices and partition layout.

free -h

Show RAM usage in a human-readable format.

sudo fdisk -l /dev/nvme0n1

List partitions on the NVMe disk.

df -h /boot

Check /boot disk usage.

parted / cfdisk

Use parted for disk inspection and cfdisk for interactive partition creation.

2

GRUB Bootloader

4 items
/etc/default/grub

Main GRUB configuration file.

grub-mkconfig -o /boot/grub/grub.cfg

Generate GRUB configuration after making sure /boot is mounted.

reboot

Restart the system after bootloader or system changes.

/etc/grub.d/40_custom

File used for custom GRUB entries.

3

Keyboard Layout

1 items
localectl set-keymap trq

Set the console keyboard layout to Turkish Q.

4

Package Management

2 items
sudo pacman -Syu

Synchronize package databases and upgrade all installed packages.

AUR helpers: yay / paru

Use AUR helpers for packages not available in official repositories.

5

YAY

5 items
git clone https://aur.archlinux.org/yay.git

Clone the YAY AUR helper source.

cd yay

Enter the cloned YAY directory.

makepkg -si

Build and install YAY from the package source.

yay -Syu

Update the system through YAY.

yay -S zen

Example AUR package installation for Zen Browser.

6

Cache Cleanup

5 items
sudo pacman -S pacman-contrib

Install pacman cache management tools.

sudo paccache -r

Clean old pacman package cache entries.

sudo paccache -rk1

Keep one cached version while cleaning pacman cache.

sudo paccache -r -k0

Remove all cached pacman package versions.

yay -Scc

Clean YAY cache.

7

Shell Configuration Files

4 items
~/.bashrc

Runs for every interactive shell; useful for aliases, functions, and shell behavior.

~/.bash_profile

Runs once at login; useful for environment variables and usually sources ~/.bashrc.

source ~/.bash_profile

Apply shell profile changes without logging out.

export ...

Export commands are temporary unless added to .bashrc or .bash_profile.

8

X11 Session Startup

3 items
~/.xinitrc

Runs before X11 starts when using startx.

#!/bin/bash export XDG_SESSION_TYPE=x11 export DESKTOP_SESSION=xfce export XDG_CURRENT_DESKTOP=XFCE exec startxfce4

Example ~/.xinitrc for starting XFCE in an X11 session.

startx

Start the X11 session manually.

9

Display Servers

3 items
Xorg

Display server handling graphics and input.

X11

Display protocol used by Xorg; defines communication between apps and the display server.

Wayland

Modern alternative to X11/Xorg.

10

Display Manager

1 items
LightDM Greeter

Provides a graphical login screen and can automatically start X sessions.

11

Expo on Arch: JDK Installation

2 items
https://jdk.java.net/archive

OpenJDK archive source; OpenJDK 17 is recommended for React Native Expo development.

sudo pacman -S jdk17-openjdk

Install OpenJDK 17 via pacman.

12

Expo on Arch: Fast Node Manager (fnm)

2 items
curl -fsSL https://fnm.vercel.app/install | bash

Install Fast Node Manager; install unzip first if setup fails.

fnm ls-remote

List available Node.js versions.

13

Expo on Arch: Node.js Installation

3 items
fnm install --lts

Install the latest Node.js LTS version.

fnm install 17

Install a specific Node.js major version when needed.

fnm install v8.3.1

Install a specific full Node.js version.

14

Expo on Arch: Android Emulator Configuration

3 items
export ANDROID_EMULATOR_HOME="$HOME/.config/.android"

Set the Android Emulator home directory.

sudo pacman -S libbsd

Install libbsd if the Android Emulator setup needs it.

AVD Settings -> Disable Auto-Save (Snapshot)

Disable the AVD snapshot auto-save feature if it causes emulator issues.

Linux

4 commands from your notes

1

Shell Information

4 items
echo $SHELL

Display the user's default shell.

echo $0

Display the currently running shell.

echo "$$"

Display the current shell process ID.

ps -p "$$"

Display the application running as the current shell process.

PMKID

10 commands from your notes

1

Hedef ve BSSID Filtresi

2 items
cd hashcat

Move into the Hashcat working directory.

echo "ffddccddaa" > filter.txt

Write the target BSSID to the filter file without separators.

2

PMKID Yakalama

1 items
hcxdumptool -o hash -i wlan0mon --filterlist=filter.txt --filtermode=2 --enable_status=1 -c x

Capture PMKID data from an authorized target on the selected channel.

3

Hashcat Biçimine Dönüştürme

1 items
hcxpcaptool -z hashtocrack hash

Convert the capture into a legacy Hashcat-compatible PMKID file.

4

Hashcat ile Test Etme

3 items
hashcat64.exe -m 16800 hashtocrack -a 3 -w 3 ?l?l?l?l?lim123 --force

Test five lowercase characters followed by the fixed suffix im123.

hashcat64.exe -m 16800 hashtocrack -a 3 -w 3 ?l?l?d?d?d?d?d?d

Test a mask containing two lowercase letters and six digits.

hashcat64.exe -m 16800 -w 3 hashtocrack -a 0 "xx.txt"

Test the PMKID hash with a wordlist.

5

hcxtools Kurulumu

2 items
apt-get install libcurl4-openssl-dev libssl-dev zlib1g-dev libpcap-dev

Install the build dependencies required by hcxtools.

make && make install

Build hcxtools from source and install it.

6

WPA Handshake Testi

1 items
hashcat64.exe -m 2500 -w 4 WIFIPASS.hccapx -a 0 "D:\Wordlist\345-12345.txt"

Test a legacy WPA/WPA2 hccapx capture with a wordlist.

Wireshark

32 commands from your notes

1

Ethernet, VLAN & MAC

4 items
eth.addr == 54:2e:6b:ce:fc:bb

Match a source or destination Ethernet MAC address.

eth.src == 54:2e:6b:ce:fc:bb

Match a source Ethernet MAC address.

eth.dst == 54:2e:6b:ce:fc:bb

Match a destination Ethernet MAC address.

vlan.id == 16

Match a VLAN ID.

2

ARP

4 items
arp.dst.hw_mac == 54:2e:6b:ce:fc:bb

Match the target MAC address in ARP.

arp.dst.proto_ipv4 == 10.10.10.10

Match the target IPv4 address in ARP.

arp.src.hw_mac == 00:1a:6b:ce:fc:bb

Match the sender MAC address in ARP.

arp.src.proto_ipv4 == 10.10.10.10

Match the sender IPv4 address in ARP.

3

IPv4 & ICMP

4 items
ip.addr == 10.10.10.10

Match a source or destination IPv4 address.

ip.dst == 10.10.10.10

Match a destination IPv4 address.

ip.src == 10.10.10.10

Match a source IPv4 address.

icmp.type == 8

Match an ICMP type; type 8 is an echo request.

4

TCP & UDP

8 items
tcp.port == 20

Match a source or destination TCP port.

tcp.dstport == 80

Match a destination TCP port.

tcp.srcport == 60234

Match a source TCP port.

udp.port == 513

Match a source or destination UDP port.

udp.dstport == 513

Match a destination UDP port.

udp.srcport == 40000

Match a source UDP port.

tcp.flags.reset == 1

Show TCP packets with the reset flag set.

tcp contains kywrd

Show TCP packets containing the specified keyword or byte sequence.

5

Application Protocols

1 items
http.request

Show all HTTP requests.

6

Routing & Redundancy Protocols

9 items
vtp.vlan_info.vlan_name == TEST

Match a VLAN name advertised by VTP.

bgp.originator_id == 192.168.1.1

Match a BGP originator ID.

bgp.next_hop == 192.168.1.1

Match a BGP next-hop IPv4 address.

rip.ip == 200.0.2.0

Match an IPv4 address advertised by RIP.

ospf.advrouter == 192.168.170.8

Match an OSPF advertising router ID.

eigrp.as == 100

Match an EIGRP autonomous system number.

hsrp.virt_ip == 192.168.23.250

Match an HSRP virtual IPv4 address.

vrrp.ip_addr == 192.168.23.250

Match a VRRP virtual IPv4 address.

zebra.dest4 == 10.10.10.10

Match a ZEBRA destination IPv4 address.

7

Wireless LAN

2 items
wlan.addr == 54:2e:6b:ce:fc:bb

Match a source or destination wireless MAC address.

wlan.sa == 54:2e:6b:ce:fc:bb

Match a wireless source MAC address.

Releases

13 commands from your notes

git tag v1.0.3

Create a local version tag.

git push origin v1.0.3

Push a version tag to the remote repository.

git push v1.0.3

Push a tag using the configured default remote.

gh release upload v1.0.0 android/app/build/outputs/apk/release/app-release.apk

Upload an APK asset to an existing GitHub release.

gh release create v1.0.0 android/app/build/outputs/apk/release/app-release.apk

Create a GitHub release with an APK asset.

gh release create v1.0.0 \ android/app/build/outputs/apk/release/app-release.apk \ --title "v1.0.0" \ --notes "Production release"

Detailed GitHub release creation command with title and notes.

gh release list

List GitHub releases.

gh issue list

List GitHub issues.

gh release delete v1.0.5 -y

Delete a GitHub release without an interactive confirmation.

git tag

List local tags.

git ls-remote --tags origin

List remote tags from origin.

git tag -d <tag_name>

Delete a local tag.

git push --delete origin <tag_name>

Delete a remote tag after deleting it locally if needed.

git tag -d <tag_name>