Skip to content

Instantly share code, notes, and snippets.

@kontez
kontez / freeotp_backup.md
Created January 4, 2018 14:27 — forked from jleclanche/freeotp_backup.md
A guide to back up and recover 2FA tokens from FreeOTP (Android)

Backing up and recovering 2FA tokens from FreeOTP

Backing up FreeOTP

Using adb, create a backup of the app using the following command:

adb backup -f freeotp-backup.ab -apk org.fedorahosted.freeotp
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
unxz wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar
mv wkhtmltox/bin/* /usr/local/bin/
rm -rf wkhtmltox
rm -f wkhtmltox-0.12.4_linux-generic-amd64.tar
@fate0
fate0 / pymarshal.py
Last active May 21, 2024 07:33
onmyoji: test
import types
import cStringIO
TYPE_NULL = '0'
TYPE_NONE = 'N'
TYPE_FALSE = 'F'
TYPE_TRUE = 'T'
TYPE_STOPITER = 'S'
TYPE_ELLIPSIS = '.'
TYPE_INT = 'i'
@rudelm
rudelm / autofs.md
Last active June 5, 2024 20:26
Use autofs on Mac OS X to mount network shares automatically during access

Autofs on Mac OS X

With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.

Prepare autofs to use a separate configuration file

autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master and add the last line:

#
# Automounter master map
#

+auto_master # Use directory service

#!/bin/bash
# Why? Education & zero redis-cli dependecy
# (it is a shame, however, that this functionality isn't a part of redis-cli... PR on the way)
HOST=127.0.0.1
PORT=6379
if [ $# -lt "2" ]
then
echo "Call a Redis command with its last argument being file contents"
echo "Usage: $0 <Redis command> <keys and arguments for command> <payload>"
@matthewtckr
matthewtckr / config_server.sh
Last active May 10, 2018 02:26
CentOS Kerberos Configuration
#!/bin/bash
# Configure Script Settings
# KDC Server Name, admin user, non-admin user, default password
HOSTNAME=kerberos.muppets.com
ADMINUSER=mtucker
NORMALUSER=pentaho
PASSWORD=Pentaho123
@kkc
kkc / statsd+graphite.md
Last active October 5, 2021 10:24
#Statsd + Graphite + Carbon + Grafana #

#Statsd + Graphite + Carbon + Grafana #

Installation

Statsd

install nodejs

sudo update
sudo apt-get -y install software-properties-common
sudo apt-get -y install python-software-properties
@afair
afair / tmux.cheat
Last active June 3, 2024 23:26
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New new -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &