- HTTP 形式:
git clone https://github.com/owner/git.git
- SSH 形式:
git clone [email protected]:owner/git.git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Generate a lot of clients for emqx 5.0 | |
-module(emqx_clients_gen). | |
-compile(export_all). | |
-compile(nowarn_export_all). | |
-define(LOG(Fmt, Args), io:format(Fmt, Args)). | |
%%-------------------------------------------------------------------- | |
%% APIs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# %CopyrightBegin% | |
# | |
# Copyright Ericsson AB 1996-2012. All Rights Reserved. | |
# | |
# The contents of this file are subject to the Erlang Public License, | |
# Version 1.1, (the "License"); you may not use this file except in | |
# compliance with the License. You should have received a copy of the | |
# Erlang Public License along with this software. If not, it can be |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo route -n add -net 132.246.0.0 -netmask 255.255.0.0 192.168.7.1 |
The shadowsocks protocol is very similar to SOCKS5 but encrypted and simpler.
Below is the structure of a shadowsocks request (sent from client-side), which is identical for both TCP and UDP connections before encrypted (or after decrypted).
+--------------+---------------------+------------------+----------+
| Address Type | Destination Address | Destination Port | Data |
+--------------+---------------------+------------------+----------+
| 1 | Variable | 2 | Variable |
+--------------+---------------------+------------------+----------+
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
binmstime() -> | |
%% The time is EMQ server time | |
{Year, Mon, Day} = date(), | |
{Hour, Min, Sec} = time(), | |
{_, _, MicroSecs} = erlang:timestamp(), | |
list_to_binary( | |
lists:flatten( | |
io_lib:format("~2..0w~2..0w~2..0w~2..0w~2..0w~2..0w~3..0w", [Year,Mon,Day,Hour,Min,Sec,trunc(MicroSecs/1000)]))). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vi /etc/environment | |
add these lines... | |
LANG=en_US.utf-8 | |
LC_ALL=en_US.utf-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REBAR3_URL=https://s3.amazonaws.com/rebar3/rebar3 | |
ifeq ($(wildcard rebar3),rebar3) | |
REBAR3 = $(CURDIR)/rebar3 | |
endif | |
REBAR3 ?= $(shell test -e `which rebar3` 2>/dev/null && which rebar3 || echo "./rebar3") | |
ifeq ($(REBAR3),) | |
REBAR3 = $(CURDIR)/rebar3 |