Skip to content

Instantly share code, notes, and snippets.

View newrerio's full-sized avatar
🌴
On vacation

大鸟 newrerio

🌴
On vacation
View GitHub Profile
@newrerio
newrerio / alibaba
Created August 10, 2020 05:23
Ubuntu 18.04 国内 apt 源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
@newrerio
newrerio / slice_trick.md
Last active January 22, 2021 08:10
slice trick

Since the introduction of the append built-in, most of the functionality of the container/vector package, which was removed in Go 1, can be replicated using append and copy.

Here are the vector methods and their slice-manipulation analogues:

AppendVector

a = append(a, b...)

Copy

使用SSH方式登录谷歌云服务器

通过网页端登录Google Cloud

切换到root用户

sudo su

修改root密码

@newrerio
newrerio / trojan-go_install.sh
Last active April 14, 2022 00:59
trojan-go一键安装
#!/bin/bash
#=================================================
# System Required: :Debian 9+/Ubuntu 18.04+/Centos 7+
# Description: Trojan&V2ray&SSR script
# Version: 1.0.0
# Author: Jeannie
# Blog: https://jeanniestudio.top/
# Official document: www.v2ray.com
#=================================================
sh_ver="1.0.0"