Skip to content

Instantly share code, notes, and snippets.

View AkdM's full-sized avatar
👋

Anthony Da Mota AkdM

👋
View GitHub Profile
@AkdM
AkdM / sign_app.md
Last active September 9, 2024 08:36
macOS sign app function - shortcut

macOS sign app shortcut

To add in .zshrc :

sign_app() {
  local app_path=$1
  # Add quarantine attribute to prevent Gatekeeper warnings
  xattr -cr "$app_path"
  # Sign the app with the specified identity
@AkdM
AkdM / configuration.yaml
Last active April 1, 2024 12:03
Tado Heating Away Mode toggle with Home Assistant
homekit: !include configurations/homekit.yaml
switch: !include configurations/switches.yaml
@AkdM
AkdM / grpd.txt
Created March 15, 2024 15:43
GRPD - stop pub
(template Maître Claude)
Madame, Monsieur,
Je vous mets solennellement en demeure de vous conformer dans les plus brefs délais aux obligations découlant du Règlement Général sur la Protection des Données (RGPD).
En effet, comme vous pourrez le constater sur le courrier de démarchage commercial joint en annexe, j'ai reçu un courrier de la part de votre agence, comportant mes nom et adresse. Or, je ne vous ai jamais donné mon consentement pour collecter et utiliser mes données personnelles à des fins de prospection, en violation des articles 5.1.a, 6 et 13 du RGPD.
Par la présente, je vous somme :
D'exercer mon droit d'accès prévu à l'article 15 en me communiquant toutes les données me concernant que vous détenez.
@AkdM
AkdM / .gitignore
Last active December 12, 2024 10:55
Daily backup Home Assistant configuration into a git repository
# You can whitelist files/folders with !, those will not be ignored.
# Everything that starts with a / are for root elements
# ignore
/custom_components/
/zigbee2mqtt/log
/zigbee2mqtt/state.json
/home-assistant_v2.* # Exclude Home Assistant history-related database. Make sure to enable git LFS if you don't exclude that, since those files can go easily over 100MB
/home-assistant.log*
/.ssh/
@AkdM
AkdM / yt-dl_ffmpeg_live.md
Last active October 22, 2022 21:50
youtube-dl and ffmpeg with a YouTube live stream

The following will get the YT livestream (it should be a .m3u8 file), and will output multiple %d.mp4 files, every 20 seconds thanks to ffmpeg:

ffmpeg -i `youtube-dl --youtube-skip-dash-manifest -g "https://www.youtube.com/watch?v=f9ALdmDLPGU"` -c copy -flags +global_header -f segment -segment_time 20 -segment_format_options movflags=+faststart -reset_timestamps 1 "%d.mp4"
@AkdM
AkdM / webos_cheatsheet.md
Last active February 18, 2024 13:33
LG webOS cheatsheet

Context

I have a LG OLED 65C1, now rooted with RootMyTV v2. I have been hacking around exploring all the possibilities, and this gist is thus a personal cheatsheet.

Commands

🔄 "Stealth" reboot

If ever your TV goes into servicing at LG for whatever reason, it would be better to have every chances to your sides by not allowing them seeing you made some "not covered" stuff to the TV. A reboot command can be detected, so there's an alternative. But it has to be confirmed yet if it's really stealth or not.

Please however note the following from @Informatic. But we don't know if LG can do something about it:

@AkdM
AkdM / hideMyEmail.applescript
Last active May 2, 2024 19:33
Generate new "Hide My Email" email with iCloud+ using AppleScript
-- Kill System Preferences first if already open
if application "System Preferences" is running then
tell application "System Events"
set theID to unix id of processes whose name is "System Preferences"
try
do shell script "kill -9 " & theID
delay 0.1
end try
end tell
end if
@AkdM
AkdM / stream.md
Last active June 18, 2022 11:12
RTSP Stream with `youtube-dl`
@AkdM
AkdM / heic2jpg.sh
Last active January 20, 2024 08:26
HEIC to JPG using terminal (in macOS)
# Add this to your .zshrc or .bashrc
# Use it by simply calling `heic2jpg pwd/picture1.heic pwd/picture2.heic pwd/picture3.heic`
# Only compatible with macOS. You can also change line 21 to make it compatible with something else.
# If you decide to delete source files, those will be in the bin, not deleted as with `rm` command.
# You will need imagemagick bin to convert the pictures: `brew install imagemagick`
heic_convert() {
echo "Converting $# .HEIC files to .jpg"
for var in "$@"
@AkdM
AkdM / ios14-certificate-pinning-bypass.md
Last active April 13, 2024 00:14
iOS 14 app TLS decrypt / certificate pinning bypass steps

This is not a tutorial, just a small guide to myself but feel free to get some infos here.

Working on an iPhone 7 running iOS 14.5.1

  1. Jailbreak an iPhone/iPad/whatever

  2. If necessary, you'll need to bypass Jailbreak detection for some apps with tweaks like A-Bypass, Hestia, HideJB, etc.

  3. Get the PID of the app you want to capture traffic from with frida-ps -Ua ( a is for showing running apps only, you can -U to show all running processes instead)