Skip to content

Instantly share code, notes, and snippets.

@0x63lv
0x63lv / rewrite_git_history.sh
Created October 20, 2017 07:29
Rewrite git commiter information based on mapping
#!/bin/env bash
# This script and mailmapping file should be on the same level as the directory
# containing the repo
#
# mailmapping file should have the following format:
# name surname [email protected] [email protected]
#
# List of commiter names emails can be obtained with:
# git shortlog -sne
@0x63lv
0x63lv / hex_to_str.py
Last active August 14, 2019 16:48 — forked from vigneshwaranr/migrator.sh
Script to convert Grafana SQLite dumps into PostgreSQL compatible dumps, and import it into PostgreSQL
#!/bin/env python
import fileinput
import re
import binascii
for line in fileinput.input(inplace = 1):
if re.search('X\'([a-fA-F0-9]+)\'', line) is not None:
unhexed_string = binascii.unhexlify(re.search('X\'([a-fA-F0-9]+)\'', line).group(1))
unhexed_string = unhexed_string.replace("'", "''")
### Keybase proof
I hereby claim:
* I am 0x63lv on github.
* I am arnis (https://keybase.io/arnis) on keybase.
* I have a public key whose fingerprint is 5B56 4985 FE26 058D 0A86 C8DB 28A7 69C6 A4F0 F7E9
To claim this, I am signing this object: