Skip to content

Instantly share code, notes, and snippets.

View Matt-Deacalion's full-sized avatar
🏹
Ready, Fire, Aim!

Matt Matt-Deacalion

🏹
Ready, Fire, Aim!
  • Budapest, Hungary
View GitHub Profile
@mortie
mortie / auto-onscreen-keyboard.sh
Created December 6, 2018 18:59
Automatically show an on-screen keyboard.
#!/bin/sh
# Automatically show an on-screen keyboard when enabling tablet mode.
# The script depends on the acpi_listen program from the acpid package,
# and the onboard program from the onboard package.
listener() {
pid=
while read -r line; do
if [ "$line" = 00000001 ]; then
@derhuerst
derhuerst / android-mitm-cert-pinning.md
Last active March 7, 2023 13:00
How to MITM Android apps using certificate pinning

How to intercept network traffic of Android apps

When you want to poke into the communication of an app.

This guide assumes you're using a UNIX-like operating system. Much of this is documented more in-depth in the objection wiki.

  1. Install Java8: brew cask install homebrew/cask-versions/java8
  2. Install apktoolbrew install apktool
  3. Install the Android SDK manager
    1. brew cask install android-sdk
@romainl
romainl / gq.vim
Last active April 29, 2025 23:04
Formatting without moving
" gq wrapper that:
" - tries its best at keeping the cursor in place
" - tries to handle formatter errors
function! Format(type, ...)
normal! '[v']gq
if v:shell_error > 0
silent undo
redraw
echomsg 'formatprg "' . &formatprg . '" exited with status ' . v:shell_error
endif
@rusty-snake
rusty-snake / firejail-check-blacklist.rs
Last active October 20, 2024 07:38
Check for every noblacklist in firejail profiles a corresponding blacklist exists
/*
* Copyright © 2019 rusty-snake <[email protected]>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@romainl
romainl / ctagsd
Last active June 1, 2024 15:56
Run ctags upon file change/addition/deletion in a Git repository
#!/usr/bin/env sh
# Requirements:
# git: https://git-scm.com/downloads
# entr: http://eradman.com/entrproject/
# ctags: http://ctags.sourceforge.net/ (Exuberant Ctags) or https://ctags.io/ (Universal Ctags)
# Usage:
# $ cd my_project
# $ ctagsd
@MaherSaif
MaherSaif / build.sh
Last active October 30, 2024 01:21
replace ngrok with nginx/ssh.
ln -s /etc/nginx/sites-available/dev /etc/nginx/sites-enabled/
# Install Certbot (letsencrypt)
echo 'deb http://deb.debian.org/debian stretch-backports main' >>
/etc/apt/sources.list
gpg --keyserver pgp.mit.edu --recv-keys 7638D0442B90D010
8B48AD6246925553
gpg --armor --export 7638D0442B90D010 | apt-key add -
gpg --armor --export 8B48AD6246925553 | apt-key add -
apt update
@rusty-snake
rusty-snake / firejail_seccomp_notify.sh
Last active October 20, 2024 07:32
firejail_seccomp_notify.sh - Notification on Seccomp violations, useful for debugging
#!/usr/bin/env bash
# Copyright © 2019,2020 rusty-snake
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
@rusty-snake
rusty-snake / firejail_blacklist_violation_notify.sh
Last active October 20, 2024 07:32
firejail_blacklist_violation_notify.sh - Notifications on blacklist violations, useful for debugging
#!/usr/bin/env bash
# Copyright © 2019,2020 rusty-snake
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
#!/usr/bin/env sh
if test ! -d ./overlay; then
read -p "No overlay found here. Want to create one? (y/N)" yn
case $yn in
[Yy]* ) install -d overlay/upperdir && install -d overlay/workdir && install -d overlay/mnt; break;;
* ) exit;;
esac
fi
@rusty-snake
rusty-snake / systemd_cmds.md
Created December 21, 2019 16:55
systemd commands

systemd commands

systemd

CMD DESC
busctl Introspect the bus.
coredumpctl List or retrieve coredumps from the journal.