Skip to content

Instantly share code, notes, and snippets.

adb shell << 'END'
run-as <package_id>
chmod 777 shared_prefs/<prefs_file_name>.xml
exit
cp /data/data/<package_id>/shared_prefs/<prefs_file_name>.xml /sdcard/Download/prefs.xml
exit
END
@wojteklu
wojteklu / clean_code.md
Last active June 8, 2024 13:17
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@insidegui
insidegui / gist:a18124c0c573a4eb656f5c485ea7dae4
Last active March 29, 2024 07:46
Unofficial documentation for the iCloud Apple device image URL format
https://statici.icloud.com/fmipmobile/deviceImages-9.0/iPhone/iPhone9,4-2-3-0/online-infobox__3x.png
A B C D E F G
A: deviceImages version seems to determine the format of the image specifier (C, D, E, F)
B: device marketing name
C: device model identifier
D: color cover glass (front color)
1 - Black
2 - White
E: device enclosure color (back color)
@kamermanpr
kamermanpr / install-xcodeCLT-homebrew-git.md
Last active November 9, 2023 17:50
Install Xcode Command Line Tools, Homebrew, and Git on macOS

Install Xcode command line tools, Homebrew, and Git on macOS

Install the following apps on your mac running macOS:

  1. (standalone) Xcode Command Line Tools
  2. Homebrew
  3. Git

Modified from: https://www.moncefbelyamani.com

using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.IO.Packaging;
using System.Linq;
using System.Reflection;
@tuanchauict
tuanchauict / README.md
Last active January 15, 2023 12:31
Safari ebooks reader improvement

A simple script for adding a jump key (N / B) with two guidelines to help reading on PC easier.

The progress is also more trackable with page and percent