Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am miketwenty1 on github.
* I am miketwenty1 (https://keybase.io/miketwenty1) on keybase.
* I have a public key whose fingerprint is AD57 64F4 ADCE 1B99 BDFD 179E 1233 5A27 1D4D 62EC
To claim this, I am signing this object:
@miketwenty1
miketwenty1 / Cargo.toml
Last active May 21, 2024 06:03
Bevy + Reqwest + WASM target Example
[package]
name = "somepackagename"
version = "0.1.0"
edition = "2021"
[dependencies]
bevy = { version = "0.9" } #, features = ["dynamic"] }
bevy-inspector-egui = "0.14"
wasm-bindgen = "0.2"
reqwest = { version = "0.11", features = ["json"] }
@miketwenty1
miketwenty1 / lib.rs
Created December 12, 2022 03:58
Generics with builder example ideas for rust
use std::default;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct FakeBodyStruct {
pub success: bool,
pub data: String,
}
@miketwenty1
miketwenty1 / learningpsbt.md
Last active June 12, 2023 02:31
Learning how psbt works in regtest

THIS IS REGTEST:

$ ./bitcoin-cli -rpcwallet=workshop listunspent

[
  {
    "txid": "00dac6388be3dea46651ee1d74ce64d3ff62e1a4886f50dcbc44a036734e217a",
    "vout": 0,
    "address": "bcrt1qf2lw756u7c085feefnlnwq5pup3rftvms7strr",
    "label": "work2",
chain=regtest
rpcpassword=workshoper123
rpcuser=pleb
blockfilterindex=1
[regtest]
rpcport=8332
fallbackfee=0.01
@miketwenty1
miketwenty1 / workshop.txt
Created September 2, 2023 05:57
bitcoin-cli workshop follow along notes
1. https://bitcoincore.org/en/download/
2. https://github.com/bitcoin/bitcoin/blob/master/doc/bitcoin-conf.md
3. https://github.com/bitcoin-core/guix.sigs
4. `tar -xvf bitcoin-25.0-arm64-apple-darwin.dmg`
5. `/Users/$USER/Library/Application Support/Bitcoin`
6. `git clone --depth 1 https://github.com/bitcoin/bitcoin.git`
7. `./share/examples/bitcoin.conf`
8.
bitcoin.conf:
@miketwenty1
miketwenty1 / zoom_pinch_system.rs
Created January 6, 2024 08:58
Multi-Touch Pinch Zoom Bevy System Example
#[allow(clippy::type_complexity, clippy::too_many_arguments)]
pub fn pinch_system(
touches: Res<Touches>,
mut touch_e: EventReader<TouchInput>,
time: Res<Time>,
mut cam_query: Query<&mut OrthographicProjection, With<Camera>>,
mut multitouch_distance: Local<f32>,
) {
let mut zoom_amount: f32 = 0.0;