Skip to content

Instantly share code, notes, and snippets.

View fed-franz's full-sized avatar

Federico Franzoni fed-franz

  • Dusk Network
  • Barcelona
View GitHub Profile
@fed-franz
fed-franz / Dockerfile
Created May 24, 2019 09:08
Dockerfile Example
# Comment
FROM ubuntu:latest
# Local ENV
ENV init=init.sh
ENV dir1=./dir1 \
dir2=./dir2
# Install from APT
@fed-franz
fed-franz / bitcoin-cli --help
Last active October 5, 2020 11:01
Bitcoin Core Help (v0.20.0)
Usage: bitcoin-cli [options] <command> [params] Send command to Bitcoin Core
or: bitcoin-cli [options] -named <command> [name=value]... Send command to Bitcoin Core (with named arguments)
or: bitcoin-cli [options] help List commands
or: bitcoin-cli [options] help <command> Get help for a command
Options:
-?
Print this help message and exit
@fed-franz
fed-franz / btc-core-linux
Last active April 14, 2021 23:34
Bitcoin Core Cross Compile (Ubuntu)
#Install dependencies
sudo apt-get install curl \
build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 \
libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev \
libzmq3-dev \
libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler \
software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
@fed-franz
fed-franz / Bitcoin-Core-Gitian-Build-Guide_Debian+script.txt
Last active January 25, 2022 09:20
HowTo: create a Bitcoin Core Gitian Build (using: Debian VM on VirtualBox + gitian-build.sh)
#References:
#https://github.com/bitcoin-core/docs/blob/master/gitian-building.md
#https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md
#https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md (actually not used in this guide, but useful as a reference)
1) Create a Debian VM as a building environment (it will be accessed via SSH)
------------------------------------------------------------------------------------------------------
Follow the instructions at:
https://github.com/bitcoin-core/docs/blob/master/gitian-building/gitian-building-create-vm-debian.md
#As root
apt-get update
apt-get install git ruby sudo apt-cacher-ng qemu-utils debootstrap lxc python-cheetah parted kpartx bridge-utils make ubuntu-archive-keyring curl
adduser gitianuser sudo
#
# the version of lxc-start in Debian needs to run as root, so make sure
# that the build script can execute it without providing a password
echo "%sudo ALL=NOPASSWD: /usr/bin/lxc-start" > /etc/sudoers.d/gitian-lxc
echo "%sudo ALL=NOPASSWD: /usr/bin/lxc-execute" >> /etc/sudoers.d/gitian-lxc
@fed-franz
fed-franz / bitcoin-core-build-gitian-2.sh
Last active January 18, 2023 13:47
Bitcoin Core - Gitian Build on Fedora (Part 2)
#Instructions taken from: https://github.com/bitcoin-core/docs/blob/master/gitian-building/gitian-building-setup-gitian-fedora.md
#Create a directory for the building process
su gitianuser
cd /home/gitian/
mkdir bitcoin-core
cd bitcoin-core
#Installing Gitian
wget http://archive.ubuntu.com/ubuntu/pool/universe/v/vm-builder/vm-builder_0.12.4+bzr494.orig.tar.gz
@fed-franz
fed-franz / bitcoin-core-build-gitian-1.sh
Last active October 18, 2017 18:01
Bitcoin Core - Gitian Build on Fedora (Part 1)
sudo su
useradd -m gitianuser
passwd gitianuser
usermod gitianuser -a -G wheel
dnf install git python ruby apt-cacher-ng qemu dpkg debootstrap python-cheetah gnupg tar rsync wget curl lxc libvirt
# Enable the apt-cacher-ng service
systemctl enable apt-cacher-ng.service
@fed-franz
fed-franz / bitcoin-core-build-fedora.sh
Last active October 28, 2018 00:57
Bitcoin-Core-Build-Fedora
sudo dnf install gcc-c++ libtool make autoconf automake openssl-devel libevent-devel boost-devel libdb4-devel libdb4-cxx-devel python3
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin/
./autogen.sh
./configure #--without-gui
make
@fed-franz
fed-franz / git-author-rewrite.sh
Last active August 23, 2024 14:24 — forked from octocat/git-author-rewrite.sh
Added OLD_NAME name replacement
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
OLD_NAME="You Old Name"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
@fed-franz
fed-franz / Windows 8.1 x86
Created February 15, 2015 11:36
Volatility Windows Memory Dump Analysis
# imageinfo
$ ./vol.py --profile=Win8SP1x86 -f win8.1-x86_booted-imagecopy.raw imageinfo
Volatility Foundation Volatility Framework 2.4
Determining profile based on KDBG search...
Suggested Profile(s) : Win8SP1x86, Win8SP0x86
AS Layer1 : IA32PagedMemoryPae (Kernel AS)
AS Layer2 : FileAddressSpace (/media/Data/Tesi/memdumps/vbox/win8/win8.1-x86_booted-imagecopy.raw)
PAE type : PAE
DTB : 0x1a5000L