Skip to content

Instantly share code, notes, and snippets.

View allisson's full-sized avatar
🏠
Working from home

Allisson Azevedo allisson

🏠
Working from home
View GitHub Profile
@delvison
delvison / tapsigner-decrypt-backup.md
Last active January 14, 2025 14:11
How to decrypt Tapsigner backup

Tapsigner is an inexpensive Bitcoin signing device that holds your private keys on an NFC card. As of writing this, nunchuck is the only mobile wallet to support it.

Backups of the private key are done so in a AES-128-CTR encryption using a key printed on the back of the card.

To decrypt this key and obtain its xprv value with openssl in cli run the following:

openssl aes-128-ctr -iv 0 -K "<BACKUP_KEY_ON_CARD>" -in backup.aes
https://bitcoin-snapshots.jaonoct.us/
@whatisor
whatisor / resign-old-commits
Created July 22, 2022 13:53
Resign old commits
1. Find your good commit id : git log
2. git rebase --exec 'git commit --amend --no-edit -n -S' -i <your latest good commit id>
3. just save and quit when prompted
4. git push origin <branch name> --force
@gugsrs
gugsrs / create_sqs_sns.py
Last active May 7, 2019 20:47
Script to create SQS and SNS from yaml
#!/usr/bin/env python
import sys
import yaml
from subprocess import call
def main():
f = open(sys.argv[1])
data = yaml.load(f)
create_queues(data['Local']['Queues'])
@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active March 3, 2025 19:37
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <[email protected]>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in
from django.contrib.admin import ModelAdmin
class MyTableAdmin(ModelAdmin):
...
paginator = LargeTablePaginator
...
@aviskase
aviskase / Postman.desktop
Last active January 22, 2025 01:08
Install Postman
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/home/USERNAME/Postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
@elliotchance
elliotchance / server.go
Last active May 30, 2020 18:40
A simple server in Go
package main
import (
"bufio"
"fmt"
"net"
)
func check(err error, message string) {
if err != nil {
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@xlab
xlab / bytes_split.go
Last active April 4, 2022 17:21
Golang split byte slice in chunks sized by limit
func split(buf []byte, lim int) [][]byte {
var chunk []byte
chunks := make([][]byte, 0, len(buf)/lim+1)
for len(buf) >= lim {
chunk, buf = buf[:lim], buf[lim:]
chunks = append(chunks, chunk)
}
if len(buf) > 0 {
chunks = append(chunks, buf[:len(buf)])
}