Skip to content

Instantly share code, notes, and snippets.

View Nazgolze's full-sized avatar
🦀
Epstein didn't kill himself

Juan Gonzalez Nazgolze

🦀
Epstein didn't kill himself
View GitHub Profile
@Nazgolze
Nazgolze / phrasegen
Last active May 18, 2020 07:14
Secure password generator using diceroll/diceware method and eff password list (baked in) [LICENSE: public domain]
#!/usr/bin/python
import secrets
import argparse
K = {
11111: "abacus",
11112: "abdomen",
11113: "abdominal",
11114: "abide",
@Nazgolze
Nazgolze / lev3.py
Last active November 8, 2020 08:27
For if you miswrote your bip39 password and you want to try to recover the real one
#!/usr/bin/env python3
""" lev3.py """
# pylint: disable=C0200,C0103
import argparse
import copy
import mnemonic
M = mnemonic.Mnemonic("english")
WORDLIST = M.wordlist
.Dd $Mdocdate: March 23 1981 $
.Dt README 1
.Os GitHub
.Sh README.mdoc
.Nm README
.Nd This is an example readme in mandoc
@Nazgolze
Nazgolze / rkt_cht_backup.sh
Last active August 2, 2019 17:16
minimal rocket chat export through api
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
echo '-----------------------------'
echo '-- Get my rocket chat data --'
echo '-----------------------------'; echo
echo 'Enter your username or e-mail address'
#!/usr/bin/python2
import hashlib
import ed25519ll
import struct
import json
import urllib2
import time
LISK_EPOCH = 1464066000
#!/usr/bin/python
import datetime
import logging
import requests
logging.basicConfig(level=logging.DEBUG)
LISK_HOST = 'testnet.lisk.io'
TARGET_HEIGHT = 5594490
@Nazgolze
Nazgolze / database_insert_errors
Last active June 6, 2018 08:03
Database Insert Errors
ERROR: integer out of range
STATEMENT: INSERT INTO “trs”(“id”,”blockId”,”type”,”timestamp”,”senderPublicKey”,”requesterPublicKey”,”senderId”,”recipientId”,”amount”,”fee”,”signature”,”signSignature”,”signatures”) VALUES (‘181175095785369468’,’5488578331239914243',0,-3704634000,’\x6dd24c92d91c0082f5be68f7350d87b7cdf105267543f1f61d3043a5c2d8a00b’,null,’3402562013208542942L’,’3402562013208542942L’,1,10000000,’\xcde9a3459b1f5590a9b6f32a5d9c2e85596be9d01ded14fa9d9c5f276a37e2562e40f459c727599323e1ee84435a63316b3a3a50fb3b5d687dc7ea1f1ad9e001',null,null)
ERROR: insert or update on table “blocks” violates foreign key constraint “blocks_previousBlock_fkey”
DETAIL: Key (previousBlock)=(5488578331239914243) is not present in table “blocks”.
STATEMENT: INSERT INTO “blocks”(“id”,”version”,”timestamp”,”height”,”previousBlock”,”numberOfTransactions”,”totalAmount”,”totalFee”,”reward”,”payloadLength”,”payloadHash”,”generatorPublicKey”,”blockSignature”) VALUES (‘13977984917448353211’,0,63803270,6144655,’5488578331239914243',0,0,
@Nazgolze
Nazgolze / hexify
Last active August 26, 2018 19:37
turn input to hex
#include <stdio.h>
int main()
{
size_t bytes_read = 0;
char buf[1024] = {0};
int idx;
do {
bytes_read = fread(buf, 1, sizeof(buf), stdin);
for(idx = 0; idx < bytes_read; idx++)
@Nazgolze
Nazgolze / git-list
Created April 16, 2015 21:02
seems more natural to me, but to each their own.
#!/bin/sh
git rev-list --reverse $@
@Nazgolze
Nazgolze / reader_to_couchdb.py
Last active December 16, 2015 18:39
short python script to save your google reader data to couchdb.
#!/usr/bin/python2
import logging
import sys
import couchdb
import json
from libgreader import GoogleReader, ClientAuthMethod, Feed
"""
Original can be obtained here: https://gist.github.com/Nazgolze/5479539