Skip to content

Instantly share code, notes, and snippets.

View xuanyuanaosheng's full-sized avatar

xuanyuanaosheng xuanyuanaosheng

View GitHub Profile
@jingmian
jingmian / ShadowSocks.sh
Last active January 9, 2023 05:27
Ubuntu下安装ShadowSocks客户端
sudo apt-get update
sudo apt-get install python-pip
sudo apt-get install python-setuptools m2crypto
pip install shadowsocks
如果是ubuntu16.04 直接 (16.04 里可以直接用apt 而不用 apt-get 这是一项改进)
sudo apt install shadowsocks
nohup sslocal -c /opt/trainee/shadowsocks.json &
@famousgarkin
famousgarkin / powershell-proxy-set-clear.ps1
Last active July 24, 2024 17:04
PowerShell Set-Proxy, Clear-proxy
# NOTE: registry keys for IE 8, may vary for other versions
$regPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings'
function Clear-Proxy
{
Set-ItemProperty -Path $regPath -Name ProxyEnable -Value 0
Set-ItemProperty -Path $regPath -Name ProxyServer -Value ''
Set-ItemProperty -Path $regPath -Name ProxyOverride -Value ''
[Environment]::SetEnvironmentVariable('http_proxy', $null, 'User')
@quietlynn
quietlynn / js_index.md
Last active October 17, 2017 08:15
JavaScript交流记录索引

基于 Node.js 和 Express.js 的 RESTful API 服务端开发

开发环境

  • Node.js (0.10.28+)
    • Arch Linux: 直接使用包管理器安装
    • Ubuntu / Debian / etc: 使用 visionmedia/n
    • OS X / Windows: 使用官方提供的安装包
  • 编辑器
  • WebStorm
@quietlynn
quietlynn / js01.md
Last active October 17, 2017 08:20 — forked from eccstartup/js01.md
@macrotea
macrotea / Chrome插件推荐.md
Last active February 4, 2017 07:49
Chrome插件推荐
@thomasfr
thomasfr / autossh.service
Last active May 9, 2024 16:59
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@binux
binux / demo.py
Created March 8, 2014 03:15
demo script for douban.com
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Created on 2014-02-28 00:15:53
from libs.pprint import pprint
from libs.base_handler import *
class Handler(BaseHandler):
'''
@gm3dmo
gm3dmo / gelfsender.sh
Last active November 16, 2023 04:47
Send a log message to a gelf server using the shell.
# This script can be used to raise a graylog2/gelf message
# gzip it and send it to a graylog server using netcat (nc)
hostname='gelftester'
short_message='test message short version'
full_message='longer test message. dont\n worry be happy'
level=1
facility='gelftester'
# gnu date
date=$(date +'%s.%N')
@clowwindy
clowwindy / ssl.md
Last active June 18, 2024 03:17
为什么不应该用 SSL 翻墙

SSL 设计目标:

  1. 防内容篡改
  2. 防冒充服务器身份
  3. 加密通信内容

而翻墙的目标:

  1. 不被检测出客户端在访问什么网站
  2. 不被检测出服务器在提供翻墙服务