Skip to content

Instantly share code, notes, and snippets.

View alessaba's full-sized avatar

Alessandro Saba alessaba

  • 03:04 (UTC +02:00)
View GitHub Profile
@iccir
iccir / darkmode.m
Last active May 6, 2021 00:47
iOS Dark Mode Toggle
/*
During Dark Mode migration for macOS, I found it helpful to have a global hotkey
which toggled between Light/Dark Mode.
This hack attempts to do something similar for iOS.
1) Add your main window in -applicationDidFinishLaunching:
2) Triple tap the window (I tend to do this near the title bar) to flip between light and dark.
*/
@steventroughtonsmith
steventroughtonsmith / bitcode2intel
Created May 18, 2019 15:31
Converts an ARM64 iOS app with Bitcode into an X86_64 variant
#!/bin/bash
TARGET="$( cd "$(dirname "$1")" ; pwd -P )/$1"
SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk"
TARGET_ARCH=x86_64
export IPHONEOS_DEPLOYMENT_TARGET=12.2
rm -r /tmp/bitcode2intel
mkdir -p /tmp/bitcode2intel
pushd /tmp/bitcode2intel
@Lazza
Lazza / attack.xml
Created January 19, 2019 22:45
Italian Electronic Invoice with PHP attachment (phpinfo)
<?xml version="1.0" encoding="UTF-8"?>
<FatturaElettronica xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" versione="FPR12" xmlns="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2">
<FatturaElettronicaHeader xmlns="">
<DatiTrasmissione>
<IdTrasmittente>
<IdPaese>IT</IdPaese>
<IdCodice>07643520567</IdCodice>
</IdTrasmittente>
<ProgressivoInvio>1</ProgressivoInvio>
<FormatoTrasmissione>FPR12</FormatoTrasmissione>
var _require_cache_ = {};
function require(name) {
let local = FileManager.local();
// look for script with the given name in iCloud documents
// and current directory adding .js to filename is not present
let resolve = function(name) {
var filename = name;
if(name.indexOf('.js') < 0) {
filename += '.js';
@zhuowei
zhuowei / avatars.db.dump
Created August 12, 2018 19:44
plutil -p - <~/Library/Developer/CoreSimulator/Devices/<device>/data/Library/Avatar/avatars.db and also a dump of that hex blob inside the first dump
{
"$archiver" => "NSKeyedArchiver"
"$objects" => [
0 => "$null"
1 => {
"$class" => <CFKeyedArchiverUID 0x7fb2a4c0d8d0 [0x7fffa1485af0]>{value = 12}
"domains" => <CFKeyedArchiverUID 0x7fb2a4c0d890 [0x7fffa1485af0]>{value = 2}
"records" => <CFKeyedArchiverUID 0x7fb2a4c0d8b0 [0x7fffa1485af0]>{value = 8}
}
2 => {
@carry0987
carry0987 / RPi3-Auto-WiFi.md
Last active April 26, 2024 11:58
Raspberry Pi 3B+ Auto reconnect to wifi when lost connect

Auto reconnect to wifi when lost connection

Before you start, make sure ip command is available on your system. In modern Linux distributions, ip replaces older ifconfig command. If net-tools package (that includes ifconfig) is not installed and you prefer using it, you can install it via sudo apt-get install net-tools.

Create script file

Use touch /home/pi/wifi-reconnect.sh to create a shell script file, with the following content:

#!/bin/bash
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 1, 2024 22:04
crack activate Office on mac with license file
@holzschu
holzschu / LLVM_for_iOS.sh
Last active December 5, 2023 02:42
Cross-compiling LLVM for iOS
#! /bin/bash
curl http://releases.llvm.org/6.0.0/llvm-6.0.0.src.tar.xz -O
tar xvzf llvm-6.0.0.src.tar.xz
rm llvm-6.0.0.src.tar.xz
cd llvm-6.0.0.src
# get clang
pushd tools
curl http://releases.llvm.org/6.0.0/cfe-6.0.0.src.tar.xz -O
@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)
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active March 12, 2024 22:46
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created