Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Harris Brakmić brakmic

🏠
Working from home
View GitHub Profile
@brakmic
brakmic / runsignet.sh
Last active May 8, 2020
Build and run Bitcoin Signet
View runsignet.sh
#!/usr/bin/env bash
#-----------------------------------------------------------------------------------------------------#
# Build and run Bitcoin Signet - developed by Kalle Alm (@kallewoof) #
# #
# Follow the development on GitHub: https://github.com/bitcoin/bitcoin/pull/18267 #
# #
# For this script to run you'll have to install several packages first (boost, libevent, libzmq3) #
# Check this doc for more info: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md #
# #
# Script usage: #
@brakmic
brakmic / tor.service
Created Jul 12, 2019
tor systemd script
View tor.service
[Unit]
Description=Anonymizing overlay network for TCP
After=network.target nss-lookup.target
[Service]
Type=notify
NotifyAccess=all
PIDFile=/var/run/tor/tor.pid
PermissionsStartOnly=yes
ExecStartPre=/usr/bin/install -Z -m 02750 -o debian-tor -g debian-tor -d /var/run/tor
@brakmic
brakmic / pkginfo.txt.patch
Created Mar 15, 2019
Modified pkginfo.txt for CM3 modula compiler build - macOS Mojave 10.14.3 only!
View pkginfo.txt.patch
diff --git a/scripts/pkginfo.txt b/scripts/pkginfo.txt
index b644a5c66..3d5bc3347 100644
--- a/scripts/pkginfo.txt
+++ b/scripts/pkginfo.txt
@@ -1,4 +1,4 @@
-import-libs base core front unicode min gui comm caltech-parser caltech-other
+import-libs base core front unicode min gui comm
m3core base core front unicode min
libm3 base core front unicode min
windowsResources core
View rule_of_zero_example.cpp
/***********************************************************
*
* Example based on an idea from the article "Rule of Zero"
* URL: https://blog.rmf.io/cxx11/rule-of-zero
*
* Must be compiled as C++11
************************************************************/
#define _SCL_SECURE_NO_WARNINGS
#define UNICODE
@brakmic
brakmic / hellow.cob
Last active Nov 24, 2017
HelloWorld in COBOL (Win32 version)
View hellow.cob
>>SOURCE FORMAT FREE
IDENTIFICATION DIVISION.
PROGRAM-ID. HelloWorld.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 HWND PIC 9(1) VALUE 0.
01 MSG PIC X(17) VALUE "Hello, World! :-)".
01 CAPTION PIC X(8) VALUE "GnuCOBOL".
01 STYLE PIC 9(1) VALUE 0.
@brakmic
brakmic / hello.cob
Created Nov 23, 2017
Hello World in COBOL
View hello.cob
000001 IDENTIFICATION DIVISION.
000002 PROGRAM-ID. HELLO-WORLD.
000003 PROCEDURE DIVISION.
000004 DISPLAY 'Hello, World!'
000005 STOP RUN.
View bitcoin.conf
listen=1
daemon=1
server=1
rest=1
externalip=YOUR_EXTERNAL_IP
bind=0.0.0.0
port=8333
maxconnections=64
upnp=0
@brakmic
brakmic / onename_verify
Created Oct 22, 2017
onename.com verify
View onename_verify
Verifying that "brakmic.id" is my Blockstack ID. https://onename.com/brakmic
@brakmic
brakmic / bitcoin_coinbase_transaction_simplified.cpp
Created Oct 8, 2017
Bitcoin Coinbase Transaction (simplified)
View bitcoin_coinbase_transaction_simplified.cpp
class CoinbaseTransaction {
public:
uint256 HashKey;
uint32_t IndexNumber;
uint32_t CoinbaseScriptLength;
uint256 CoinbaseScript;
uint32_t InputSequenceNumber;
};
@brakmic
brakmic / bitcoin_transaction_input_simplified.cpp
Created Oct 8, 2017
Bitcoin Transaction Input (simplified)
View bitcoin_transaction_input_simplified.cpp
class TransactionInput {
public:
uint256 HashKey;
uint32_t IndexNumber;
uint32_t SignatureScriptLength;
uint256 ResponseScript;
uint32_t InputSequenceNumber;
};