Skip to content

Instantly share code, notes, and snippets.

View willywotz's full-sized avatar

Chaiwat Chairit willywotz

  • Ubon Ratchathani, Thailand
  • Instagram willywotz
View GitHub Profile
@yoyoismee
yoyoismee / kiln-geth-lighthouse-validatorKey-validator.sh
Last active July 6, 2022 16:03
set up geth lighthouse validatorKey validator for kiln test net
echo "hey you know that run a script with out reading is a bad idea right?
script by yoyoismee.eth
modified from remyroy, ethstaker"
read test
echo "eh! did you read that. are you sure that you wanna run this? have you read?!?"
read test
echo "If I'm a hacker you'll be rekt by now you know that right?"
read test
# general
@korrio
korrio / ModSalary.sol
Created April 13, 2021 07:05
ModSalary.sol
// File: @openzeppelin/contracts/math/SafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
/ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=WAN1
add address=192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 interface=WAN2
/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000KiB max-udp-packet-size=512 servers=221.132.112.8,8.8.8.8
/ip firewall mangle
add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN1_conn
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_conn
add chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=to_WAN1
add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2
@gaearon
gaearon / slim-redux.js
Last active April 25, 2024 18:19
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@prof7bit
prof7bit / .gitignore
Last active March 17, 2022 09:13
The portfolio rebalancing bot will buy and sell to maintain a constant asset allocation ratio of exactly 50/50 = fiat/BTC
/.project