Skip to content

Instantly share code, notes, and snippets.

Peter Lodri szepnapot

View GitHub Profile
szepnapot /
Last active May 20, 2019 — forked from bmaupin/
Install apktool in Linux
# Get latest version from
export apktool_version=2.4.0
sudo -E sh -c 'wget$apktool_version.jar -O /usr/local/bin/apktool.jar'
sudo chmod +r /usr/local/bin/apktool.jar
sudo sh -c 'wget -O /usr/local/bin/apktool'
sudo chmod +x /usr/local/bin/apktool
# To use:
# apktool d TelephonyProvider.apk -o TelephonyProvider
szepnapot /
Created May 10, 2019
[Uubntu hardening] #security #harden #ubuntu
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean
------------ auto update
szepnapot /
Created May 10, 2019
[How to build Androdi ROMs on Ubuntu 16.04] #aosp #build #ubuntu
# setup repo tool
mkdir -p ~/bin
wget '' -P ~/bin
# install dependencies
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk android-tools-adb bc bison build-essential curl flex g++-multilib gcc-multilib gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc yasm zip zlib1g-dev
mkdir -p ~/aosp/pie
szepnapot / ubuntu_unattended_upgrades_gmail.markdown
Created Mar 22, 2019 — forked from roybotnik/ubuntu_unattended_upgrades_gmail.markdown
Unattended upgrades on Ubuntu 14.04 with email notifications
View ubuntu_unattended_upgrades_gmail.markdown

Getting Started

Do yourself a favor and login as root to save yourself some time and headaches:

$ sudo su -

Install unattended-upgrades:

View How to leave a message for a user
<input id=username type="text" placeholder="github username or repo link">
<button onclick="fetch(`${username.value.replace(/^.*com[/]([^/]*).*$/,'$1')}/events/public`).then(e=> e.json()).then(e => [ Set([].concat.apply([],e.filter(x => x.type==='PushEvent').map(x => =>]).then(x => results.innerText = x)">GO</button>
<div id=results></div>
szepnapot /
Last active Feb 25, 2019
Downloads alexa top 1 million site csv and load the urls into noisy's config.json
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
curl -sSL "" | tar xvfz - -C .
python - <<EOF
import json
szepnapot /
Last active Feb 18, 2019
Recover a secret string from random triplets
from itertools import chain
def get_behind_chars(c, pool):
behind = []
for item in pool:
if c in item:
chars = item[item.index(c):]
[behind.append(_) for _ in chars if _ != c]
return list(set(behind))
szepnapot /
Last active Feb 18, 2019
Docker stuffs

E: Unable to locate package [xxx]

apt-get update
apt-get install apt-file
apt-file update

Install the CLI

sudo apt-get install python-pip
sudo pip install awscli

# upgrade
sudo pip install --upgrade awscli
szepnapot / archive_multi_into_flatzip
Created Feb 6, 2019
[create flat zip from multi dir] create a zip with multiple files without sub-folders #bash #unix #shortcut
View archive_multi_into_flatzip
zip myfiles d0
(cd f1; zip -u ../ d1)
(cd f2/f3; zip -u ../../ d4)
# example
# zip -j a/*.hdl
# (cd b; zip -u ../ *.hdl)
# The parentheses create subshells, and the effect of the cd only lasts in the subshell,
# so you don't have to cd back to the original directory.
You can’t perform that action at this time.