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
@shinnida220
shinnida220 / Download File with Node.md
Created September 14, 2022 16:13 — forked from gkhays/Download File with Node.md
Download a file from a URL using Node.js

Download File from URL

Proof-of-concept to download a file from a URL and save it locally. For example, I may wish to retrieve a JAR file from Nexus.

Uses the http package, which does the basics with raw HTTP protocol support.

Possible update: use request, it is like the Python's requests library. There is a companion package called node-request-progress that tracks download progress. See request-progress on GitHub.

Note: The request package has been deprecated.

Option 1 — Installing Node.js with Apt from the Default Repositories
Ubuntu 20.04 contains a version of Node.js in its default repositories that can be used to provide a consistent experience across multiple systems. At the time of writing, the version in the repositories is 10.19. This will not be the latest version, but it should be stable and sufficient for quick experimentation with the language.
Warning: the version of Node.js included with Ubuntu 20.04, version 10.19, is now unsupported and unmaintained. You should not use this version in production, and should refer to one of the other sections in this tutorial to install a more recent version of Node.
To get this version, you can use the apt package manager. Refresh your local package index first by typing:
sudo apt update
Then install Node.js:
@shinnida220
shinnida220 / gist:5260fe95519d90cfb2bde47cacb56f02
Created July 19, 2022 10:34
How to install Hadolint on Linux | Ubuntu
# Reference from here[https://github.com/hadolint/hadolint/] and here[https://stackoverflow.com/a/62370018/380138]
1. Use wget download the linux release that matches your setup and it directly directly in the bin folder like in the below
`wget -O /bin/hadolint https://github.com/hadolint/hadolint/releases/download/v2.10.0/hadolint-Linux-x86_64`
This will download the content of the link and saveit as hadolint in the bin directory
2. Setup permission to make the downloaded file executable bu running
`chmod +x /bin/hadolint`
@shinnida220
shinnida220 / install.sh
Last active July 22, 2022 23:27 — forked from mslinn/install.sh
Install AWS Cloud9 (with AWS CLI & Docker) on an Ubuntu 20.04 server external to AWS
# Log into your Ubuntu machine then follow these directions
# First allow Cloud9 to ssh to your machine using your account:
# https://docs.aws.amazon.com/cloud9/latest/user-guide/create-environment-ssh.html
# Install required dependencies
if [ -z `which virtualenv` ]; then
sudo pip install virtualenv
fi
if [ -z `apt -qq list libevent-dev 2> /dev/null | grep installed` ]; then
@shinnida220
shinnida220 / dumpwallet.py
Created February 4, 2018 18:07 — forked from nlitsme/dumpwallet.py
create readable hex dump of a bitcoin, litecoin, etc wallet.dat
from bsddb.db import *
import sys
import struct
# by Willem Hengeveld <itsme@xs4all.nl>
# usage: python dumpwallet path_to_your/wallet.dat
# note: you need to have the bsddb package installed
def getcompact(k, i):
b= ord(k[i]) ; i+=1
@shinnida220
shinnida220 / dumpwallet.py
Created February 4, 2018 18:04
Tool for dumping the private keys out of a Bitcoin Core wallet file
#!/usr/bin/env python2
import sys
import struct
from bsddb.db import *
from hashlib import sha256
# Dumps the private keys from an unencrypted wallet.dat file.
# Inspired by pywallet.
# Run with Python 2.7.
# Donations: 34rHZwgXDnkKvrBAU2fJAhjySTTEFroekd.
@shinnida220
shinnida220 / bitwalletrecover.py
Created February 4, 2018 17:23 — forked from msm595/bitwalletrecover.py
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"]