Skip to content

Instantly share code, notes, and snippets.

View Someguy123's full-sized avatar

Someguy123 Someguy123

View GitHub Profile
@Someguy123
Someguy123 / dark-cryptofolio.css
Created August 13, 2020 21:44
Dark Cryptofolio CSS Theme
/**
* Dark Cryptofolio.info Theme
* Written by Someguy123 ( https://github.com/Someguy123 )
* License: X11 / MIT
*/
body {
background-color: #3c3c3c;
}
@Someguy123
Someguy123 / bitcoin_bits_target_difficulty.py
Created August 10, 2020 01:08
Bitcoin Bits <> Target <> Difficulty conversion code for Python, for decoding the "bits" segment of Bitcoin/Litecoin/Dogecoin etc. block headers
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@ecdsa.org
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
@Someguy123
Someguy123 / nginx_hive_rpc_hivemind_health.conf
Created July 22, 2020 01:16
Hive RPC Nginx Config with health endpoint's for Hivemind, Full / Fat Node + Acc Hist - Used by Privex Inc. for direct.hived.privex.io
#######################
#
# Hive RPC Nginx Config with health endpoint's for Hivemind, Full / Fat Node + Acc Hist
#
# (C) 2020 Privex Inc. + Someguy123
# https://www.privex.io https://peakd.com/@someguy123
#
#######################
# Dirty Hack. Causes nginx to retry jussi
@Someguy123
Someguy123 / rs_hivemind.sh
Created July 2, 2020 22:35
Hivemind Jussi Restarter Script
#!/usr/bin/env bash
##########################################
#
# Hivemind + Jussi Restarter Script
#
# (C) 2020 Someguy123 ( www.privex.io )
# License: MIT/X11
#
##########################################
@Someguy123
Someguy123 / node_config.json
Last active May 19, 2020 04:49
example config for steem/hive `data/witness_node_data_dir/p2p/node_config.json`
{
"listen_endpoint": "0.0.0.0:2001",
"accept_incoming_connections": true,
"wait_if_endpoint_is_busy": true,
"private_key": "0000000000000000000000000000000000000000000000000000000000000000",
"desired_number_of_connections": 100,
"maximum_number_of_connections": 200,
"peer_connection_retry_timeout": 30,
"peer_inactivity_timeout": 5,
"peer_advertising_disabled": false,
@Someguy123
Someguy123 / config.lua
Created April 19, 2020 00:48
A dump of PowerDNS Lua scripting/configuration used for maintaining a DNS seed/pool domain (returns multiple A/AAAA records based on available servers), such as Privex's Chrony (time server) pool
--
-- Name: configv4.chrony.privex.cc
-- Type: LUA
-- Value: LUA "include('g_a'); SEv4={g_a('se1', 1), g_a('se2', 1)} DEv4={g_a('de1', 1), g_a('de2', 1)} FIv4={g_a('fi1', 1)}"
--
include('g_a');
SEv4={g_a('se1', 1), g_a('se2', 1)}
DEv4={g_a('de1', 1), g_a('de2', 1)}
FIv4={g_a('fi1', 1)}
@Someguy123
Someguy123 / growpart.sh
Created August 25, 2019 05:10
Growpart patched for alpine linux - place in /usr/bin/growpart and chmod +x
#!/bin/sh
# Copyright (C) 2011 Canonical Ltd.
# Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
#
# Authors: Scott Moser <smoser@canonical.com>
# Juerg Haefliger <juerg.haefliger@hp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
@Someguy123
Someguy123 / deswappify.pl
Last active February 11, 2024 19:34 — forked from WGH-/deswappify.pl
#!/usr/bin/perl
use strict;
use Fcntl qw(SEEK_SET);
sub deswappify {
my $pid = shift;
my $fh = undef;
my $start_addr;
@Someguy123
Someguy123 / logwatcher.sh
Created September 15, 2018 00:17
get timestamps on your steem docker logs
#!/bin/bash
# get timestamps on your steem docker logs
# by @someguy123
: ${DOCKER_NAME=seed}
LOG_PATH=$(docker inspect $DOCKER_NAME | jq -r .[0].LogPath)
pipe=/tmp/dkpipe.fifo
trap "rm -f $pipe" EXIT
if [[ ! -p $pipe ]]; then
mkfifo $pipe
@Someguy123
Someguy123 / filter_bitaddress.bash
Last active September 20, 2016 04:34
Extract only spent private keys from a BitAddress/LiteAddress text file
# This means to build an array () based on line breaks in the file
# allowing us to use it with a for loop
LFS='
'
# btcaddrs contains addresses that are actually used
addresses=($(cat btcaddrs.txt))
# filter the bitaddress file btc.txt to only contain used addresses
# then spit out the un-quoted private keys
(for a in $addresses; do grep $a btc.txt; done) | awk '{ split($0,a,","); print a[3] }' | tr -d '"'