Skip to content

Instantly share code, notes, and snippets.

View hclivess's full-sized avatar
🏠
Working from home

Jan Kučera hclivess

🏠
Working from home
View GitHub Profile
@hclivess
hclivess / digest.py
Created June 29, 2019 19:36
digest improvement proposal
import hashlib
import os
import sys
import essentials
import mempool as mp
import mining
import mining_heavy3
import staking
from difficulty import *
@hclivess
hclivess / gist:d82157b4f42ceb5d79618de55b17947e
Last active October 12, 2019 19:12
How to compile old crypto
sudo apt-get remove libssl-dev
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install -y git unzip build-essential libssl-dev libdb++-dev libboost-all-dev libqrencode-dev libminiupnpc-dev libevent-dev autogen automake libtool libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools qt5-default
sudo ldconfig
@hclivess
hclivess / debug.md
Last active July 10, 2019 00:15
Debugging Bismuth
  1. Create file named config_custom.txt in your Bismuth folder
  2. Enter the following lines:

debug=True

terminal_output=True

debug_level=WARNING

  1. Restart your node
@hclivess
hclivess / pprop.py
Last active July 28, 2019 18:22
peerlist proposal
def peersync(self, subdata: str) -> int:
"""Got a peers list from a peer, process. From worker().
returns the number of added peers, -1 if it was locked or not accepting new peers
subdata is a dict, { 'ip': 'port'}"""
with self.peersync_lock:
try:
total_added = 0
subdata = self.dict_validate(subdata)
data_dict = json.loads(subdata)
@hclivess
hclivess / encrypt_decrypt.py
Created August 2, 2019 20:45
bismuth encryption interface
from Cryptodome.Cipher import AES, PKCS1_OAEP
from Cryptodome.PublicKey import RSA
from Cryptodome.Random import get_random_bytes
import base64
import ast
from bisbasic import essentials
from bisbasic.simplecrypt import decrypt
import getpass
key, public_key_readable, private_key_readable, encrypted, unlocked, _, myaddress, keyfile = essentials.keys_load_new("wallet.der")
@hclivess
hclivess / add_fb_friends.js
Created September 4, 2019 22:02
add_fb_friends.js
javascript:
var delayInput = prompt("Delay between actions (ms)", "1000");
var stopAfter = prompt("Stop after how many friend requests are sent?", "100");
var workDelay = parseInt(delayInput, 10);
var loading = document.createElement("div");
loading.setAttribute("id", "noni_loading");
loading.setAttribute("style", "position: fixed; background: rgba(255,255,255,0.8); top: 0; left: 0; width: 100%; font-size: 24px; z-index: 1000; padding: 12px;");
document.body.appendChild(loading);
document.getElementById("noni_loading").innerHTML = "No friends added.";
@hclivess
hclivess / fb_message_sender.py
Last active September 6, 2019 14:01
fb_message_sender.py
from fbchat import Client
from fbchat.models import *
import time
import json
import random
counter = 0
with open("secret.json") as file:
parsed = json.loads(file.read())
@hclivess
hclivess / fb_message_ai.py
Created September 5, 2019 12:51
fb_message_ai.py
from fbchat import Client
from fbchat.models import *
import time
import json
import random
from textgenrnn import textgenrnn
with open("secret.json") as file:
parsed = json.loads(file.read())
@hclivess
hclivess / delete_fb_friend_requests.js
Last active September 12, 2019 17:55
delete_fb_friend_requests.js
!!! DELETE FRIEND REQUESTS OUTGOING: https://m.facebook.com/friends/center/requests/outgoing/#friends_center_main
javascript:var inputs = document.getElementsByClassName('_54k8 _56bs _56bt');
for(var i=0; i<inputs.length;i++) {
inputs[i].click();
}
!!! ADD NEW FRIENDS: https://m.facebook.com/friends/center/requests/?rfj&no_hist=1
javascript:var inputs = document.getElementsByClassName('_54k8 _52jg _56bs _26vk _40x9 _56bu');
@hclivess
hclivess / unfollow-non-followers-twitter.js
Created September 6, 2019 23:47 — forked from jalbam/unfollow-non-followers-twitter.js
Code to stop following those ones who are not following you back on Twitter and keeping those you want or follow anyone you want, with certain filters (working in July 2019)
/*
Unfollow (stop following) those people who are not following you back on Twitter (or unfollow everyone if desired).
This will work for new Twitter web site code structure (it was changed from July 2019, causing other unfollow-scripts to stop working).
Instructions:
1) The code may need to be modified depending on the language of your Twitter web site:
* For English language web site, no modification needed.
* For Spanish language web site, remember to set the 'LANGUAGE' variable to "ES".
* For another language, remember to set the 'LANGUAGE' variable to that language and modify the 'WORDS' object to add the words in that language.