Skip to content

Instantly share code, notes, and snippets.

View shinnida220's full-sized avatar
💭
caressing php, wooing android and eyeing angular

Emmanuel Ibikunle shinnida220

💭
caressing php, wooing android and eyeing angular
View GitHub Profile
@jhoenicke
jhoenicke / break-short.c
Created April 6, 2017 09:31
Program to brute force private keys from public keys using the baby-step giant-step algorithm.
/**********************************************************************
* Copyright (c) 2017, Jochen Hoenicke *
* *
* Compile with: *
* gcc -O2 -I secp256k1/src/ -I secp256k1/ break_short.c -lgmp *
**********************************************************************/
#include "libsecp256k1-config.h"
#include <stdio.h>
@alibo
alibo / s3-slack-notifier-lambda.js
Created February 20, 2017 20:52
Send S3 events to s slack channel via Lambda and Node.js
'use strict';
/*
Thanks to https://gist.github.com/vgeshel/1dba698aed9e8b39a464
*/
console.log('Loading function');
const aws = require('aws-sdk');
const s3 = new aws.S3({ apiVersion: '2006-03-01' });
@IntegersOfK
IntegersOfK / combos.py
Created July 21, 2016 14:03
A python sample snippet for reordering bip39 mnemonic seed words into a valid bip39 seed (corrects word order to fix checksum/compliance with bip39)
#This snippet takes words intended for a bip39 mnemonic seed as a list and reorders them into a seed where the checksum validates.
#Often people want to choose their own seed words but the resulting order doesn't adhere to the bip39 specification,
#This is a way to force your favourite words into a valid hd bip39 seed. Disclaimer: Use true random entropy to select your words!
#All possible combinations are written to a text file, but that's probably going to be a lot of choice so you should probably
#Limit the number of itterations or cancel it a ways into processing
import itertools
import os
import binascii
import mnemonic
@Wieljer
Wieljer / create-mysql.bash
Last active September 4, 2022 00:07 — forked from omeinusch/create-mysql.bash
Simple non-interactive bash script to create mysql db, user with generated password.
#!/bin/bash
PASS=$(pwgen -s 15 1)
USER="CDRT"
DB="drupal"
service mysqld start
mysql -uroot <<MYSQL_SCRIPT
CREATE DATABASE $DB;
CREATE USER '$USER'@'localhost' IDENTIFIED BY '$PASS';
@vasanthk
vasanthk / System Design.md
Last active June 6, 2024 09:07
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@BluSyn
BluSyn / derive.js
Last active January 28, 2021 20:21
Bitcoin BIP39 mnemonic seed to extended MPK (watch-only public key)
/**
* Converts mnemonic recovery seed
* into xpub for watch-only services
*
* Dependencies:
* npm install bitcore bitcore-mnemonic
*/
var bitcore = require('bitcore');
var bitcoreMnemonic = require('bitcore-mnemonic');
@edin-m
edin-m / html5-video-play-file-blob.html
Last active May 17, 2024 07:45
HTML video play file blob object url
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<video></video>
<br/>
<input type="file" name="file" id="fileItem" onchange="onChange()" >
@CoinWhisperer
CoinWhisperer / burn-btc
Last active November 2, 2021 17:38
A simple python program to create bitcoin burn addresses.
#! /usr/bin/env python
"""
burn-btc: create a bitcoin burn address
By James C. Stroud
This program requries base58 (https://pypi.python.org/pypi/base58/0.2.1).
Call the program with a template burn address as the only argument::
@jbinto
jbinto / howto-recover-google-authenticator-keys.txt
Created February 8, 2014 04:20
Recovering Google Authenticator keys from Android device for backup
### Last tested February 7 2014 on a Galaxy S3 (d2att) running Cyanogenmod 11 nightly, with Google Authenticator 2.49.
### Device with Google Authenticator must have root.
### Computer requires Android Developer Tools and SQLite 3.
### Connect your device in USB debugging mode.
$ cd /tmp
$ adb root
$ adb pull /data/data/com.google.android.apps.authenticator2/databases/databases
@msm595
msm595 / bitwalletrecover.py
Last active April 9, 2024 16:48
bitwalletrecover.py - recover compressed private keys from your bitcoin wallet. Requires python3, pycoin (https://pypi.python.org/pypi/pycoin), and base58 (https://pypi.python.org/pypi/base58).
import re
import hashlib
import base58
from pycoin.ecdsa import generator_secp256k1, public_pair_for_secret_exponent
def bytetohex(byteStr):
return ''.join( [ "%02X" % x for x in byteStr ] ).strip()
litecoin = [b"\x30", b"\xb0"]
bitcoin = [b"\x00", b"\x80"]