Skip to content

Instantly share code, notes, and snippets.

View daoleno's full-sized avatar
🤘
rock & roll

daoleno daoleno

🤘
rock & roll
View GitHub Profile
@daoleno
daoleno / twitter-blur-keywords.md
Last active June 28, 2023 09:58
通过关键字模糊推文
@daoleno
daoleno / uniswapv2.go
Created March 16, 2022 08:18
Generated uniswap v2 code.
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package uniswap
import (
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
@daoleno
daoleno / homebrew
Last active August 14, 2020 14:08
homebrew 国内源
清华源
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
brew update
@daoleno
daoleno / book_list.md
Last active February 17, 2020 01:40
book list
@daoleno
daoleno / reload-browser.sh
Created November 12, 2019 06:31
reload-browser - A cross-platform wrapper for reloading the current
#!/bin/sh
# reload-browser - A cross-platform wrapper for reloading the current
# browser tab
# Eric Radman, 2014
# http://eradman.com/entrproject/scripts/
usage() {
case `uname` in
Darwin)
# applescript needs the exact title
Client sends HTTP request → Nginx chooses the appropriate handler based on the location config → (if applicable) load-balancer picks a backend server → Handler does its thing and passes each output buffer to the first filter → First filter passes the output to the second filter → second to third → third to fourth → etc. → Final response sent to client

reference

Emiller’s Guide To Nginx Module Development

@daoleno
daoleno / regex.md
Last active August 12, 2018 10:48
some regex

domain

sample.com

^(\*\.)?([a-zA-Z0-9-]+\.){0,5}[a-zA-Z0-9-]+\.[a-zA-Z]{1,63}$

hostname

^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$";
@daoleno
daoleno / EventSourcing.md
Created May 20, 2018 15:10
What is Event Sourcing?
  • Events to provide a history
  • Aggregates to represent the current state of the application
  • Calculator to update the state of the application
  • Reactors to trigger side effects as events happen

img