Skip to content

Instantly share code, notes, and snippets.

View Tknott95's full-sized avatar
🍀

TKnott Tknott95

🍀
View GitHub Profile
@jamiephan
jamiephan / README.md
Last active September 23, 2024 04:00
A script to automatically add ALL items to your account in quixel

Script to add all items from quixel

As quixel is being removed, all items are free to aquire. This script is to automate the process to add items to your account (As of writing, a total of 18874 items)

Note: This script only tested in the latest version of Chrome.

How to use

  1. Copy the script from below (run.js)
  2. Login into https://quixel.com
@OrionReed
OrionReed / dom3d.js
Last active September 23, 2024 03:02
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@SmaugPool
SmaugPool / scripts_resources.md
Last active December 17, 2023 22:35
Scripts Memory Units & Execution Steps used by Cardano transactions & blocks

Smart Contracts on Cardano are Plutus scripts. We often talk about the size of transactions and blocks compared to the maximum currently authorized by the protocol parameters, but scripts are also limited in CPU and memory units.

Here is the description of those 3 properties from Cardano docs:

  • The total on-chain transaction size in bytes: a simple transaction, for example, is around 300 bytes, one with metadata is around 650 bytes, and Plutus scripts are typically 4,000-8,000 bytes (future optimizations and improvements will reduce this).
  • The number of computational (CPU) steps that the script uses: each step represents 1 picosecond of execution time on a benchmark machine. Typical scripts should consume less than 1,000,000,000 (1 millisecond).
  • The number of memory units that the script uses: this represents the number of bytes that the script allocates. Typical scripts should consume less than 1,000,000 memory units (
@nickfarrow
nickfarrow / malleablefrost.md
Last active September 6, 2024 12:55
Modifying FROST Threshold and Signers

Modifying FROST Signers and Threshold

FROST's distributed key generation involves N parties each creating a secret polynomial, and sharing evaluations of this polynomial with other parties to create a distributed FROST key.

The final FROST key is described by a joint polynomial, where the x=0 intercept is the jointly shared secret s=f(0). Each participant controls a single point on this polynomial at their participant index.

The degree T-1 of the polynomials determines the threshold T of the multisignature - as this sets the number of points required to interpolate the joint polynomial and compute evaluations under the joint secret.

T parties can interact in order to interpolate evaluations using the secret f[0] without ever actually reconstructing this secret in isolation (unlike Shamir Secret Sharing where you have to reconstruct the secret).


@p1nox
p1nox / pytorch_rtx_3060.md
Last active December 17, 2023 02:27
PyTorch on RTX 3060

After researching a lot on how to use PyTorch with a RTX 3060 card, specially with older versions or torch (0.4.0) and torchvision (0.2.1), I noticed that it was either impossible or very hard to do. RTX 3060 and these packages apparently doesn't have compatibility with the same versions of CUDA and cuDNN. I tried to do this by using different combinations with compiled versions available in conda, but didn't work, maybe it could work if you recompile from source these versions.

After all this, actually I was able to use RTX 3060 effectively with latest versions of all these dependencies with two methods:

  1. Using a conda env, and latest versions published in pytorch site (https://pytorch.org/get-started/locally):
conda create -n rtx_3060 python=3.6.5
conda activate rtx_3060
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia
@Tknott95
Tknott95 / fleece.MD
Created March 24, 2021 13:11
Jackie Kennedy Poetry
The lights glowed inside, soon supper would ring
And he would go home where his father was King.

But no he was here with the wind and the sea
And all the things he was going to be.

He would build empires
And he would have sons
Others would fall
@SmaugPool
SmaugPool / cardano-cli-completion.md
Last active November 29, 2023 11:57
cardano-cli Bash auto-completion

To enable cardano-cli and cardano-node bash auto-completion for the current shell:

source <(cardano-cli --bash-completion-script cardano-cli)
source <(cardano-cli --bash-completion-script cardano-node)

To enable it for all future sessions:

@Tknott95
Tknott95 / nietzsche.MD
Last active December 26, 2019 11:47
“And those who were seen dancing were thought to be insane by those who could not hear the music.” ~Nietzsche
  “And those who were seen dancing were thought to be insane by those who could not hear the music.”
~Nietzsche
@Tknott95
Tknott95 / gist:cc860a04ad84891fc273d19b40e49326
Last active April 12, 2019 02:38
Letter to Pythocles Epicurus

This letter contains explanations of various celestial phenomena along with some pro-empiricist epistemological remarks and ethical justifications for scientific study:

Epicurus to Pythocles, greeting:

In your letter to me, of which Cleon was the bearer, you continue to show me affection which I have merited by my devotion to you, and you try, not without success, to recall the considerations which make for a happy life. To aid your memory you ask me for a clear and concise statement respecting celestial phenomena; for what we have written on this subject elsewhere is, you tell me, hard to remember, although you have my books constantly with you. I was glad to receive your request and am full of pleasant expectations. We will then complete our writing and grant all you ask. Many others besides you will find these reasonings useful, and especially those who have but recently made acquaintance with the true story of nature and those who are attached to pursuits which go deeper than any part of ordinary educat

Non timebo mala