Skip to content

Instantly share code, notes, and snippets.

View nmay231's full-sized avatar

Noah nmay231

  • 04:28 (UTC -05:00)
View GitHub Profile
@gnembon
gnembon / tick.md
Last active April 24, 2024 14:21
How to use vanilla /tick if you used carpet /tick before

So /tick is now available in vanilla. Well, most of it is. Obviously only one could exist at a time, meaning /tick from carpet is gone, so here is the gist... mhm... of what happened, what is covered, what is lost and what might not be lost forever. This is not a writeup from a Mojang developer, it's a writeup from a mod developer whose part of the mod just got obsolete by a gaming studio.

The good

/tick on its own, as a query command, is moved to vanilla /tick query providing much more information about the health of the game tick. Tick performance and tick targets are also now way better handled in F3 and especially F3+2 screens, but if you are not in singleplayer or run the server with your game, a better information directly from the server through /tick query may come in handy.

/tick rate now exists as a vanilla command. It is limited on the lower end to 1 tps (not 0.1 tps like in carpet) to get a more responsive chat (the only reason so far tbh), but due to improvements to h

@antimatter15
antimatter15 / README.md
Created August 16, 2021 06:21
Arbitrary Base Conversion Algorithm (Javascript)

Arbitrary Base Conversion Algorithm

This is a function that can convert between arbitrary bases implemented in both Javascript and Python.

Many existing implementations, such as https://rot47.net/base.html or https://gist.github.com/inflammable/2929362 use a number as the internal representation, and thus can't safely encode/decode more than 8 letters of Base64 encoded text, or 9 letters of Base58 text (which isn't enough for parsing a Bitcoin address).

Other implementations rely on complicated third party libraries for bignum (e.g. https://rosettacode.org/wiki/Non-decimal_radices/Convert#JavaScript).

Several implementations required converting to Uint8Arrays (Base 256) as an intermediate. Others were essentially ports of complicated C implementations (see https://github.com/cryptocoinjs/base-x/blob/master/src/index.js).

@thevtm
thevtm / gist:16511e71c9b21e69088579aa8c421412
Created November 27, 2020 15:51
Alacritty terminal drop down (Quake style) using tdrop and sxhkd
# https://github.com/alacritty/alacritty
# https://github.com/dancor/wmctrl
# https://github.com/baskerville/sxhkd
# https://github.com/noctuid/tdrop
super + z
tdrop -n top --width 100% --height 30% --post-map-hook 'wmctrl -r "Alacritty - Drop Down - Top" -b add,above,sticky' alacritty --title 'Alacritty - Drop Down - Top'
super + shift + z
tdrop -n bottom -y 64% --width 100% --height 30% --post-map-hook 'wmctrl -r "Alacritty - Drop Down - Bottom" -b add,above,sticky' alacritty --title 'Alacritty - Drop Down - Bottom'
@ChuckJonas
ChuckJonas / Redux
Last active November 14, 2021 17:23
React React
[react-redux-typescript-guide](https://github.com/piotrwitek/react-redux-typescript-guide)
[FAQ](http://redux.js.org/docs/FAQ.html)
[Redux Actions in typescript](https://spin.atomicobject.com/2017/07/24/redux-action-pattern-typescript/)
```typescript
export enum TypeKeys {
INC = 'INC',
DEC = 'DEC',
OTHER_ACTION = '__any_other_action_type__'
}
@CMCDragonkai
CMCDragonkai / higher_kinded_types_in_rust_and_haskell.md
Last active July 10, 2024 12:38
Rust/Haskell: Higher-Kinded Types (HKT)

Rust/Haskell: Higher-Kinded Types (HKT)

A higher kinded type is a concept that reifies a type constructor as an actual type.

A type constructor can be thought of in these analogies:

  • like a function in the type universe
  • as a type with a "hole" in it