Skip to content

Instantly share code, notes, and snippets.

View TomaszWaszczyk's full-sized avatar
🔑

Tomasz Waszczyk TomaszWaszczyk

🔑
View GitHub Profile
@TomaszWaszczyk
TomaszWaszczyk / GPG and git on macOS.md
Created November 3, 2022 10:27 — forked from danieleggert/GPG and git on macOS.md
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@TomaszWaszczyk
TomaszWaszczyk / git-auto-sign-commits.sh
Created November 2, 2022 17:16 — forked from mort3za/git-auto-sign-commits.sh
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
@TomaszWaszczyk
TomaszWaszczyk / chaumian.md
Created October 30, 2022 11:26 — forked from AdamISZ/chaumian.md
Chaumian ecash designs, notes

Chaumian cash in a Bitcoin world - cashu, Fedimint

What's this for?

  • More scalable/faster than a blockchain (not enough utxos)
  • Much better privacy security model than a blockchain
  • Same or better theft security model than TTP but much worse than a blockchain

If it's so great, why hasn't it been done yet?

@TomaszWaszczyk
TomaszWaszczyk / README.md
Created October 11, 2021 09:46 — forked from renestalder/README.md
Unfollow all on Facebook

Facebook: Unfollow people and pages

  1. Open news feed preferences on your Facebook menu (browser)
  2. Click people or pages
  3. Scroll down (or click see more) until your full list is loaded
  4. Run the script in your browser console

Facebook will block this feature for you while you use it, depending on how much entities you try to unfollow. It automatically unblocks in a couple of hours and you will be able to continue.

See comments section for more up-to-date versions of the script. The original script is from 2017 and will not work as is.

@TomaszWaszczyk
TomaszWaszczyk / zshrc
Created September 11, 2021 12:05 — forked from LukeSmithxyz/zshrc
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
// USAGE EXAMPLE
render() {
const { currentUserState, nearEnv } = this.state;
return currentUserState.match({
notAsked: () => <HomePage />,
loading: () => <HomePage />,
failure: (err) => <>Error occurred</>,
success: (user) => <AppRouter currentUser={user} nearEnv={nearEnv} />,
@TomaszWaszczyk
TomaszWaszczyk / installing-node-with-nvm.md
Created August 11, 2021 14:49 — forked from d2s/installing-node-with-nvm.md
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.
#![feature(prelude_import)]
#![no_std]
// Copyright 2017-2019 Parity Technologies (UK) Ltd.
// This file is part of Substrate.
// Substrate 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, either version 3 of the License, or
// (at your option) any later version.
@TomaszWaszczyk
TomaszWaszczyk / index.js
Created June 13, 2021 12:07 — forked from shawntabrizi/kusama.js
unlocking data on substrate
var { ApiPromise, WsProvider } = require('@polkadot/api');
var { BN_ZERO } = require('@polkadot/util');
async function main() {
const provider = new WsProvider("wss://kusama-rpc.polkadot.io/", false);
provider.connect();
const api = await ApiPromise.create({ provider });
// Get general information about the node we are connected to
const [chain, nodeName, nodeVersion] = await Promise.all([
@TomaszWaszczyk
TomaszWaszczyk / superpolynomial.txt
Created April 12, 2021 20:55 — forked from rietta/superpolynomial.txt
Memorize the RSA encryption algorithm as a song! This is a mirrored copy of the RSA, Superpolynomial song which has become hard to find on the Internet.
These original sources are now no longer available:
- http://www.xent.com/FoRK-archive/oct00/0429.html
- http://www.cryptorights.org/events/2000/superpolynomial.html
For a 2000 example of how to use this song in a lecture format, see http://permalink.gmane.org/gmane.comp.encryption.general/4856 by Eric Hughes.
To the tune of Mary Poppins:
Superpolynomial subexponential runtimes.
Even though in practice it would take you several lifetimes,