Skip to content

Instantly share code, notes, and snippets.

View zhiyouce's full-sized avatar
🏠
Organizing

LIANG LI zhiyouce

🏠
Organizing
View GitHub Profile
@zhiyouce
zhiyouce / Makefile
Created March 1, 2024 18:04 — forked from alexedwards/Makefile
Boilerplate Makefile for Go projects
# Change these variables as necessary.
MAIN_PACKAGE_PATH := ./cmd/example
BINARY_NAME := example
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
@zhiyouce
zhiyouce / bash_strict_mode.md
Created October 17, 2023 07:31 — forked from vncsna/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

set -e, -u, -o, -x pipefail

The set lines

  • These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
  • With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
  • set -euxo pipefail is short for:
set -e
set -u
@zhiyouce
zhiyouce / build_web3_apps.md
Created April 21, 2022 08:16 — forked from nguyer/build_web3_apps.md
Build Ethereum Web3 Apps Quickly Using the Latest Tools

Workshop Guide - Building Apps on FireFly

Welcome! We're glad you're here! This is the guide that we will be going through during the workshop.

Before the workshop

IMPORTANT: Please make sure you have installed the software listed in this section before the workshop so that we can hit the ground running when the workshop starts.

Install Docker

@zhiyouce
zhiyouce / firefly_dev_workshop.md
Created April 21, 2022 08:03 — forked from nguyer/firefly_dev_workshop.md
FireFly Developer Workshop

FireFly Developer Workshop

This workshop will guide developers in setting up FireFly on their machine as well as a complete dev environment to be able to contribute code back to the FireFly project.

Workshop Goals

By the end of this workshop you will have:

  • A working developer environment capable of:
  • Building apps that run on FireFly

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@zhiyouce
zhiyouce / IP.ps1
Created May 12, 2020 00:12
windows PS :IP query
function curlIP {
$ipcUrl ="http://api.db-ip.com/v2/free/" + $args[0]
curl $ipcUrl
}
Set-Alias IP curlIP
@zhiyouce
zhiyouce / guide.md
Created February 9, 2020 23:46
One button install trojan proxy script
  • Prepare CentOS 7 instance
  • Open 443 and 80 ports
  • Prepare domain and bind it to instance ip address
  • Run script to install trojan
curl -O https://raw.githubusercontent.com/atrandys/trojan/master/trojan_mult.sh && chmod +x trojan_mult.sh && ./trojan_mult.sh
  • Run script to install BBR Plus
ARG FUNCTION_RUNTIME
FROM mikesir87/aws-cli as code
ARG FUNCTION_NAME
ARG AWS_DEFAULT_REGION
ARG AWS_ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY
RUN wget -O function.zip `aws lambda get-function --function-name $FUNCTION_NAME --query 'Code.Location' --output text`