Skip to content

Instantly share code, notes, and snippets.

View TimothyYe's full-sized avatar
🖋️
Creating bugs...

Timothy TimothyYe

🖋️
Creating bugs...
  • Singapore
View GitHub Profile
@TimothyYe
TimothyYe / script.sh
Created September 1, 2017 06:38 — forked from codexss/debian install rinetd-lkl shadowsocks-libev.sh
debian install rinetd-lkl shadowsocks-libev
echo "deb http://httpredir.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
apt update
apt install shadowsocks-libev curl -y
cat > /etc/shadowsocks-libev/config.json <<EOF
{
"server":"0.0.0.0",
"server_port":443,
"local_port":1080,
"password":"foobar!",
#! /bin/bash
function valid_required_envs() {
# Configs
required_envs=(KUBE_CONTEXT KUBE_SERVER)
# Securities
required_envs+=(KUBE_CERTIFICATE_AUTHORITY)
required_envs+=(KUBE_CLIENT_CERTIFICATE KUBE_CLIENT_KEY)
errors=()
@TimothyYe
TimothyYe / Dockerfile
Last active September 13, 2016 04:04
My shadowsocks Dockerfile
FROM alpine:latest
MAINTAINER Timothy
RUN apk --no-cache add wget gzip && cd /
RUN wget https://github.com/shadowsocks/shadowsocks-go/releases/download/1.1.5/shadowsocks-server-linux64-1.1.5.gz --no-check-certificate
RUN gzip -d shadowsocks-server-linux64-1.1.5.gz
RUN mv shadowsocks-server-linux64-1.1.5 server
RUN chmod +x server
RUN apk del wget gzip
@TimothyYe
TimothyYe / shadow.service
Last active May 11, 2016 08:59
Shadowsocks server via systemd
[Unit]
Description=Shadowsocks Server
After=network.target
[Service]
ExecStart=/home/timothy/shadowsocks/shadowsocks-server -c /home/timothy/shadowsocks/config.json
Restart=always
User=timothy
Group=timothy
KillMode=process
@TimothyYe
TimothyYe / shadowsocks-server.service
Created May 7, 2016 12:13 — forked from dorentus/shadowsocks-server.service
wget 'https://gist.githubusercontent.com/dorentus/10704239/raw/shadowsocks-server.service' -O /etc/systemd/system/shadowsocks-server.service && systemctl enable shadowsocks-server.service && systemctl start shadowsocks-server.service
[Unit]
Description=Shadowsocks Server
After=network.target
[Service]
Type=forking
PIDFile=/run/shadowsocks/server.pid
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p /run/shadowsocks
ExecStartPre=/bin/chown nobody:nogroup /run/shadowsocks
@TimothyYe
TimothyYe / tmux.conf
Created June 25, 2015 06:07
My tmux conf file
# 配置使用和GNU Screen相同的C-a作为命令引导键
set -g prefix C-g
# 设置终端类型为256色
set -g default-terminal "screen-256color"
# Set default shell to zsh
set-option -g default-shell /bin/zsh
# 设置状态栏前景及背景色
set -g status-bg colour23
set -g status-fg colour238
@TimothyYe
TimothyYe / fake-service.go
Last active August 29, 2015 14:20
A fake tcp service for joking...
package main
import (
"flag"
"fmt"
"log"
"net"
"os"
)
@TimothyYe
TimothyYe / .tmux.conf
Created June 19, 2014 15:17
tmux config
# 配置使用和GNU Screen相同的C-a作为命令引导键
set -g prefix C-a
# 设置终端类型为256色
set -g default-terminal "screen-256color"
# 设置状态栏前景及背景色
set -g status-bg colour23
set -g status-fg colour238
# 设置窗口标签的前景及背景色
// This hack works with com.android.tools.build:gradle:0.2, won't work in later version without modification
apply plugin: 'android'
targetCompatibility = 1.6
sourceCompatibility = 1.6
android {
target = 'android-14'
@TimothyYe
TimothyYe / dnspodsh.sh
Created April 1, 2012 14:32 — forked from zrong/dnspodsh.sh
在bash中使用DNSPod的API接口实现DDNS客户端
#!/bin/bash
##############################
# dnspodsh v0.3
# 基于dnspod api构架的bash ddns客户端
# 作者:zrong(zengrong.net)
# 详细介绍:http://zengrong.net/post/1524.htm
# 创建日期:2012-02-13
# 更新日期:2012-03-11
##############################