Skip to content

Instantly share code, notes, and snippets.

View LeoVS09's full-sized avatar

Vladislav Goncharov LeoVS09

  • Gdansk, Poland
View GitHub Profile
@lhorie
lhorie / post.md
Last active March 24, 2022 02:02
Friday Fun: Svelte-like variable reactivity in 7LOC with with Proxy

Friday Fun: Svelte-like variable reactivity in 7LOC with with Proxy

Every once in a blue moon, I like to hack up some crazy toy proof of concept to get away from everyday's stiff serious production-ready coding. This morning, I decided to mess around with an idea of implementing something similar to Svelte's reactive variables, but using pure Javascript.

So here's that godawful eye-bleeding fun hack: a 7-line "svelte" (needless to say, it doesn't do nearly enough to be useful in the real world and breaks just about every best practice rule in the book because why the hell not)

https://codepen.io/lhorie/pen/BaRzgRe

Can you figure out why this works? Any ideas to make it more devilish/clever/insane are welcome :)

@PaulRBerg
PaulRBerg / FullMath.sol
Last active July 18, 2022 15:51
Remco Bloemen's "mulDiv" ported to Solidity v0.8 by Paul Razvan Berg. See latest: https://github.com/paulrberg/prb-math/blob/86c068e21f9ba229025a77b951bd3c4c4cf103da/contracts/PRBMath.sol#L480-L537
/// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
/// @param a The multiplicand
/// @param b The multiplier
/// @param denominator The divisor
/// @return result The 256-bit result
/// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
function mulDiv(
uint256 a,
uint256 b,
uint256 denominator
#############################################################################################
# Creating Temporary Preview Environments Based On Pull Requests With Argo CD And Codefresh #
#############################################################################################
########################################
# Creating The Project And App Of Apps #
########################################
open https://github.com/vfarcic/argocd-previews
# Source: https://gist.github.com/808108069f709572f1bc372c65f6b5c0
###########
# Prepare #
###########
# Option 1:
# Create a Kubernetes cluster
# Install NGINX Ingress
# Install Argo CD