Skip to content

Instantly share code, notes, and snippets.

View huobazi's full-sized avatar
🎯
Focusing

Marble Wu huobazi

🎯
Focusing
View GitHub Profile
@huobazi
huobazi / readme.txt
Created January 6, 2016 06:32 — forked from fqrouter/readme.txt
shadowsocks 公共代理的必要设置
good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。
但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能)
本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考
https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks
1、 shadowsocks的timeout设置
超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。
2、 检查操作系统的各种限制
对于openvz的vps,特别需要检查一下
@huobazi
huobazi / camo.md
Created November 19, 2015 09:31
camo

camo

@huobazi
huobazi / install_google_chrome_on_ubuntu.md
Last active November 11, 2015 09:07
Install Google Chrome on Ubuntu
@huobazi
huobazi / 00_install_rbenv_for_zsh.sh
Last active November 5, 2015 06:09
ubuntu 14.04 env init
cd
sudo apt-get update -y
sudo apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
exec $SHELL
@huobazi
huobazi / digital_ocean_setup.md
Created November 4, 2015 02:14 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

$ ssh root@123.123.123.123

Change Root Password

@huobazi
huobazi / meta-tags.md
Last active September 9, 2015 05:45 — forked from balduran/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@huobazi
huobazi / Win7清除垃圾文件.bat
Last active August 22, 2020 06:38
Win7清除垃圾文件.bat
@echo off
color 0a
title windows7系统垃圾清理---
echo ★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★
echo ★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★
echo.★☆ ☆★
echo.★☆ ☆★
echo.★☆ 清理系统垃圾文件,请稍等...... ☆★
echo ★☆ ☆★
echo.★☆ ☆★
@huobazi
huobazi / gist:f69433d35d8cfbc3b7c9
Created March 23, 2015 00:38
check if a object is ina array
func Contains(obj interface{}, target interface{}) (bool, error) {
targetValue := reflect.ValueOf(target)
switch reflect.TypeOf(target).Kind() {
case reflect.Slice, reflect.Array:
for i := 0; i < targetValue.Len(); i++ {
if targetValue.Index(i).Interface() == obj {
return true, nil
}
}
case reflect.Map:
@huobazi
huobazi / iewarning.html
Created January 8, 2015 09:32
iewarning
<!--[if lt IE 10]>
<script> // 如果推荐语使用默认值,可以删除此 script 标签
// IEDIE_HINT = '<p>自定义的提示语</p>';
// 改为推荐 IE11,在 XP 系统下提示操作系统过时
</script>
<script src="http://wuyongzhiyong.b0.upaiyun.com/iedie/v1.1/script.min.js"></script>
<![endif]-->
@huobazi
huobazi / settings.yml
Last active August 29, 2015 14:12 — forked from quanon/settings.yml
lodge:
per_size: 30
right_list_size: 10
slack:
defaults: &defaults
url: https://slack.com
channel: #channel
# トークンは Slack API のページで発行できます。
token: my_token