Skip to content

Instantly share code, notes, and snippets.

#http://www.dd-wrt.com/phpBB2/viewtopic.php?t=282831&start=435&sid=05c113416d737b2a58aa1a8708bb5e5b
#mount -o bind /mnt/sdb1 /jffs
#mount /dev/sda1 /jffs
mkdir -p /jffs/etc
mkdir -p /jffs/usr/local
mkdir -p /jffs/opt/bin/
mkdir -p /jffs/tmp/ipkg/
# Copy the contents of the current directories
#!/usr/bin/env python
import sys
import os
def nextSetting(f):
keySize = ord(f.read(1))
key = f.read(keySize)
valueSize = ord(f.read(1)) + (ord(f.read(1))*256)
value= f.read(valueSize)
#sys.stdout.write ('(k=%3d,v=%4d,pos=%6s) %s = %s\n' % (keySize, valueSize, hex(f.tell()), key, value))
DROP TABLE IF EXISTS pgbench_generic_log;
CREATE TABLE pgbench_generic_log (
mtime timestamptz not null default now(),
action char not null check (action in ('I', 'U', 'D')),
username text not null,
table_name text not null,
row_data jsonb not null
);
CREATE INDEX ON pgbench_generic_log USING brin (mtime);
@brunomgalmeida
brunomgalmeida / decrypt_dbeaver.py
Created August 6, 2020 09:09 — forked from felipou/decrypt_dbeaver.py
DBeaver password decryption script - for newer versions of DBeaver
# https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection
# requires pycrypto lib (pip install pycrypto)
import sys
import base64
import os
import json
from Crypto.Cipher import AES
@brunomgalmeida
brunomgalmeida / decrypt_dbeaver.py
Created August 6, 2020 09:09 — forked from felipou/decrypt_dbeaver.py
DBeaver password decryption script
# https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection
import sys
import base64
print(sys.argv[1])
PASSWORD_ENCRYPTION_KEY = b"sdf@!#$verf^wv%6Fwe%$$#FFGwfsdefwfe135s$^H)dg"