Skip to content

Instantly share code, notes, and snippets.

View mz0's full-sized avatar
☂️
לֹא הַבַּיְשָׁן לָמֵד‎

Mark Zhitomirski mz0

☂️
לֹא הַבַּיְשָׁן לָמֵד‎
View GitHub Profile
@mz0
mz0 / learning-notes.md
Last active May 13, 2025 17:25
On learning
@mz0
mz0 / JavaScript-notes.md
Last active May 5, 2025 16:25
JavaScript history bits

JavaScript

was built in only 10 days in 1995 by a single person, Brendan Eich, who was tasked with building a simple scripting language to be used in version 2 of the Netscape browser. It was initially called LiveScript, but since the Java language was so popular at the time, the name was changed to JavaScript - although Java and JavaScript are in no way related.

For the first few years, after it was built, JavaScript was a simple scripting language to add mouseover effects and other interactivity. Those effects were being added to webpages using the <script> HTML element.

@mz0
mz0 / integrity.sh
Created April 28, 2025 21:19
Compute integrity_no="sha384-SgOJ...79m7" string for HTML resources
#!/bin/sh
if [ ! -n "$1" ]; then
echo "No file path argument found"
elif [ -f $1 ]; then
b64=$(sha384sum $1 | grep -o -E '^[a-f0-9]{96}' | xxd -r -p | base64)
echo "integrity=\"sha384-${b64}\""
else
echo "\"$1\" not found, or is not readable"
fi
@mz0
mz0 / blockchain-dict.txt
Last active March 17, 2025 11:29
Blockchain Lexikon
CIA-triad - Confidentiality, Integrity, Availability
DAO - Decentralized Automous Org
DeFi - Decentralized Finance
DON - Decentralized Oracle Network
OCR - Off-Chain Reporting
Rollup - Off-Chain Txn Bundler
TEF - Transaction Execution Framework
VRF - Verifiable Random Function
@mz0
mz0 / fscrypt-enable.sh
Created January 25, 2025 18:48
Ubuntu fscrypt
sudo apt install fscrypt libpam-fscrypt
sudo blkid
FileSystem=/dev/nvme0n1p4
getconf PAGE_SIZE # 4096
sudo tune2fs -l $FileSystem | grep 'Block size'
sudo tune2fs -O encrypt $FileSystem
sudo fscrypt setup
sudo pam-auth-update
@mz0
mz0 / create-homed-user.sh
Last active December 15, 2024 19:37
Ubuntu 24.04 setting up user with systemd-homed
apt-cache policy systemd-homed
# systemd-homed: Candidate: 255.4-1ubuntu8.4
sudo apt install systemd-homed
# The following NEW packages installed: systemd-homed systemd-userdbd
sudo homectl --real-name=ZM \
--uid=60131 \
--kill-processes=false \
--member-of=docker,dip,lpadmin,plugdev,ops,sudo,users,wireshark \
@mz0
mz0 / homoiconic-python-post.md
Created May 13, 2024 12:47 — forked from aburjg/homoiconic-python-post.md
Homoiconic Python Post
@mz0
mz0 / Readme-Windows.md
Last active February 23, 2023 21:16
Shsha Windows development

Install Java

We are turning off PATH, JAVA_HOME modifications so we can install multiple versions of Java, and set PATH as needed per-project. However

  • we do not provide instructions for this scenario (TODO jps)
  • if this is the only Java on your workstation, you can let setup do these changes for you
winget install --interactive BellSoft.LibericaJDK.11

Interactively set this location C:\JDK\11, and turn off PATH, JAVA_HOME, and Jar assotiation

Setup JDK11

@mz0
mz0 / tomcat-shsha
Created January 31, 2022 12:49
Tomcat/Shsha(w/Hazelcast 3.12) Unit file for EL7/JDK11
# this is /etc/default/tomcat-shsha
TOMCAT=/srv/tomcat
JAVA_OPTS=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-Djdk.tls.ephemeralDHKeySize=2048 \
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources \
-Dorg.apache.catalina.security.SecurityListener.UMASK=0027 \
-Dhazelcast.logging.type=log4j2 \
--add-modules java.se \
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED \