Skip to content

Instantly share code, notes, and snippets.

View AkdM's full-sized avatar

Anthony Da Mota AkdM

View GitHub Profile
AkdM / .gitignore
Last active January 13, 2024 11:27
Daily backup Home Assistant configuration into a git repository
View .gitignore
# You can whitelist files/folders with !, those will not be ignored.
# ignore
.ssh/ # Don't be stupid and ignore that folder
AkdM /
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 ""` -c copy -flags +global_header -f segment -segment_time 20 -segment_format_options movflags=+faststart -reset_timestamps 1 "%d.mp4"
AkdM /
Last active February 18, 2024 13:33
LG webOS cheatsheet


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.


🔄 "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 / hideMyEmail.applescript
Last active November 25, 2022 01:21
Generate new "Hide My Email" email with iCloud+ using AppleScript
View hideMyEmail.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"
do shell script "kill -9 " & theID
delay 0.1
end try
end tell
end if
AkdM /
Last active June 18, 2022 11:12
RTSP Stream with `youtube-dl`
AkdM /
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 /
Last active January 8, 2024 05:02
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)

AkdM / amd.js
Last active April 15, 2021 16:33
View amd.js
// ==UserScript==
// @name AMD Button
// @version 0.1
// @description YAY
// @author AkdM
// @match*/direct-buy/*
// @icon
// @grant none
// ==/UserScript==
AkdM / addToCart.js
Last active April 8, 2021 16:12
Add to Bookmark
View addToCart.js
javascript: (async function () {
const t = (t) => (document.querySelector(".page-title").innerText = t);
try {
t("looking for product id...");
var e = (() => document.location.pathname.split("/").filter((t) => /\d{10}/.test(t))[0])();
t("adding to cart..."), await ((t) => fetch(`${t}`, { credentials: "include", method: "GET", mode: "cors", redirect: "error" }))(e), t("added to cart, fetching checkout URL...");
var a = await (async () => {
var t = await fetch("", { credentials: "include", method: "POST", mode: "cors" });
return (await t.text()).match(/\/.{2}\\\/direct-buy\\\/checkout\\\/payment\\\/\d*\\\/.{2}/)[0].replace(/\\/g, "");
AkdM /
Created February 14, 2020 00:22
D-Bus Cheatsheet


  • qdbus (sudo apt install qdbus)


List services