Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nickyreinert's full-sized avatar

nicky nickyreinert

View GitHub Profile
@nickyreinert
nickyreinert / aa-export-import.ipynb
Created February 5, 2024 22:20
Adobe Analytics Export-Import Helper (Data Feed - BulkData Insertion API)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nickyreinert
nickyreinert / script.sh
Last active January 18, 2024 06:46
MacOS automation and workflows
# 2. The same as 1. but instead of watching changes, this script runs sheduled
# use this for larger folders
# either use https://launched.zerowidth.com/plists/rt8LaZeMvL or follow those steps
# create a folder for this LaunchAgent
mkdir -p ~/Library/LaunchAgents
# create a LaunchAgent file
nano ~/Library/LaunchAgents/launched.sycn.plist
launchctl load -w ~/Library/LaunchAgents/launched.sycn.plist
launchctl list | grep sync
# content of the file, replace "ADD RSYNC COMMAND" with your command
@nickyreinert
nickyreinert / primes.ipynb
Last active December 11, 2023 21:53
Improve Calculation of Prime Numbers in Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nickyreinert
nickyreinert / 01 init.ipynb
Last active February 7, 2023 19:49
Step-by-Step implementation of the SHA-256 algorithm in Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nickyreinert
nickyreinert / sha256_documented.ipynb
Created February 7, 2023 19:48
Step-by-Step implementation of the SHA-256 algorithm in Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# header for block 727155
DECLARE hash_prev_block STRING DEFAULT "00000000000000000004136135b2e0cd367b56ea6c0dd5b8f79964a4cd7d2718";
DECLARE merkle_root STRING DEFAULT "0d14fac91555d6337b10b2f20de231858fb5225f2ff685cd9b487c235d6e8307";
DECLARE header_datetime STRING DEFAULT "622defb9";
DECLARE bits STRING DEFAULT "170a3773";
DECLARE nonce STRING DEFAULT "c8f05860";
DECLARE nonce_dec INT64 DEFAULT 3371194460; # target is 3371194464
DECLARE version STRING DEFAULT "20002000";
DECLARE soft_forks STRING DEFAULT "0000000000000";
DECLARE version_roller INT64 DEFAULT 1;
@nickyreinert
nickyreinert / find_nonce.ipynb
Last active March 20, 2022 10:18
Find a nonce for given set of header fields, utilizing overt ASIC boost
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nickyreinert
nickyreinert / boilerplate.py
Last active March 19, 2022 12:52
Python script boilerplate with environment creation, code examples & telegram logging
#!./bin/python
# prepare your virtual environment
######################################################################
# python3 -m venv ~/python_dev
# cd ~/python_dev
# source bin/activate
# manager requirements
######################################################################
@nickyreinert
nickyreinert / domevents.html
Last active November 20, 2021 23:02
Demonstrate DOM events and async/defer features in JavaScript
<!--
This script logs events to the console adding a timestamp
This script helps to understand the different states of a document
and how async/defer loading tag works
This example should run with a webserver, although is plain HTML and JavaScript.
If you call it directly with a browser, you may not be able to simulate a real environment
1. Create a huge random image like that e.g:
php -d memory_limit=1G -r '$x = $y = 500; $im = imagecreatetruecolor($x,$y); for($i = 0; $i < $x; $i++) { for($j = 0; $j < $y; $j++) {$color = imagecolorallocate($im, rand(0,255), rand(0,255), rand(0,255)); imagesetpixel($im, $i, $j, $color); } }; imagepng($im, "sample.png");'