Skip to content

Instantly share code, notes, and snippets.

View gaga5lala's full-sized avatar
🐈

Gaga Pan gaga5lala

🐈
  • Tokyo
View GitHub Profile
@gaga5lala
gaga5lala / .zshrc
Last active December 29, 2017 08:27
# vim ~/.zshrc
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
fi
}
# reference: https://rlafranchi.github.io/2017/03/08/tree-traversal-for-rubyists/
# http://alrightchiu.github.io/SecondRound/binary-tree-traversalxun-fang.html
class Node
attr_accessor :left, :right
attr_reader :val
def initialize(val)
@val = val
end
end
0474926679508468d6be6e3ba0ac2cd203d627acebfc10a5ad076ccbdf22411bd602e9dff15e2e6abd0bd09eee826eea7d5561e9100531c9263769bef8544e8276
# ref: https://blog.huli.tw/2017/09/03/moving-from-logdown-to-hexo/
declare -a articles=(
# public: "/account/posts/#{digit}-{title}"/raw
# draft: "/account/posts/#{digit}"/raw
"/account/posts/111111-title1/raw"
"/account/posts/222222/raw"
)
declare -a unsaved_articles=()
@gaga5lala
gaga5lala / BeaconProxy.sol
Created August 6, 2022 01:00 — forked from hihiben/BeaconProxy.sol
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.14+commit.80d49f37.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.14;
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/proxy/beacon/BeaconProxy.sol";
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/proxy/beacon/UpgradeableBeacon.sol";
import {ImplementationV1, ImplementationV2} from "./Implementation.sol";
contract Setup {
address immutable public proxy1;
address immutable public proxy2;
@gaga5lala
gaga5lala / rxjs-diagrams.md
Created January 25, 2023 17:23 — forked from PCreations/rxjs-diagrams.md
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K