Skip to content

Instantly share code, notes, and snippets.

View FreezeSoul's full-sized avatar
🏠
Working from home

FS.IO FreezeSoul

🏠
Working from home
View GitHub Profile
@FreezeSoul
FreezeSoul / 0_reuse_code.js
Created October 9, 2016 10:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@FreezeSoul
FreezeSoul / bash-cheatsheet.sh
Created September 28, 2019 08:59 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@FreezeSoul
FreezeSoul / amd-cmd-umd-commonjs.md
Created July 12, 2022 01:19 — forked from bndynet/amd-cmd-umd-commonjs.md
AMD、CMD、UMD、CommonJS

Over the years there’s been a steadily increasing ecosystem of JavaScript components to choose from. The sheer amount of choices is fantastic, but this also infamously presents a difficulty when components are mixed-and-matched. And it doesn’t take too long for budding developers to find out that not all components are built to play nicely together.

To address these issues, the competing module specs AMD and CommonJS have appeared on the scene, allowing developers to write their code in an agreed-upon sandboxed and modularized way, so as not to “pollute the ecosystem”.

AMD(Asynchromous Module Definition)

Asynchronous Module Definition (AMD) has gained traction on the frontend, with RequireJS being the most popular implementation.

Here’s module foo with a single dependency on jquery:

@FreezeSoul
FreezeSoul / wait_for_http_200.sh
Created August 31, 2023 13:23 — forked from eisenreich/wait_for_http_200.sh
Wait for HTTP endpoints to return 200 OK with bash, curl and timeout
#!/bin/bash
##############################################################################################
# Wait for URLs until return HTTP 200
#
# - Just pass as many urls as required to the script - the script will wait for each, one by one
#
# Example: ./wait_for_urls.sh "${MY_VARIABLE}" "http://192.168.56.101:8080"
##############################################################################################
// 安装客户端
apt install -y shadowsocks
// 代理服务器配置, 16.04 tls 上 apt 安装的 ss 客户端仅支持部分加密 method, 比如 aes-256-cfb
// 建一个配置文件,比如 shadowsocks.json ,写入:
{
"server":"代理服务器的ip",
"server_port":10763,
"local_address":"127.0.0.1",
"local_port":1080,