Skip to content

Instantly share code, notes, and snippets.

View gaga5lala's full-sized avatar
🐈

Gaga Pan gaga5lala

🐈
  • Taiwan
View GitHub Profile
@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
@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;
# 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=()
0474926679508468d6be6e3ba0ac2cd203d627acebfc10a5ad076ccbdf22411bd602e9dff15e2e6abd0bd09eee826eea7d5561e9100531c9263769bef8544e8276
# 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
@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
}
@gaga5lala
gaga5lala / hide_gitlab_system_note.js
Last active December 8, 2017 01:51
Bookmarklet to hide gitlab system notes. (e.g, issue edit history)
javascript:(function(){document.querySelectorAll("ul.notes .system-note").forEach(function(ele){ele.style.display ='none'})})()
@gaga5lala
gaga5lala / The Technical Interview Cheat Sheet.md
Created December 6, 2017 03:05 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@gaga5lala
gaga5lala / restore_docker_image_tag.sh
Created November 7, 2017 02:04
Restore docker image tag from text file.
# 1. Backup image tags to text file.
# $ docker images --format "{{.Repository}}:{{.Tag}} {{.ID}}" > img_id.txt
#
# 2. Execute clean-docker-for-mac script
# $ bash clean-docker-for-mac.sh $(docker images --format "{{.ID}}" | xargs)
#
# source: https://gist.github.com/MrTrustor/e690ba75cefe844086f5e7da909b35ce#file-clean-docker-for-mac-sh
#
# 3. Execute this script to restore tags from text file.
@gaga5lala
gaga5lala / jupyter_shortcuts.md
Created September 22, 2017 04:47 — forked from kidpixo/jupyter_shortcuts.md
Keyboard shortcuts for ipython notebook 3.1.0 / jupyter

Toc

Keyboard shortcuts

The IPython Notebook has two different keyboard input modes. Edit mode allows you to type code/text into a cell and is indicated by a green cell border. Command mode binds the keyboard to notebook level actions and is indicated by a grey cell border.

MacOS modifier keys:

  • ⌘ : Command