Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@falseen
falseen / socket.py
Last active February 21, 2017 06:16
限制ss客户端数量(基于ip判断),理论上可以用于其他使用了socket模块的python程序。为方便管理,已迁移至github : https://github.com/falseen/socket_path
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 Falseen
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy

测试平台:DigitalOcean VPS ubuntu14.04 x64, strongswan5.2.2

运行以下命令请使用root权限

一:安装strongswan

由于ubuntu软件仓库中strongswan版本较低,因此从官网源码编译安装

apt-get install build-essential     #编译环境
aptitude install libgmp10 libgmp3-dev libssl-dev pkg-config libpcsclite-dev libpam0g-dev     #编译所需要的软件
@cocoajin
cocoajin / ios_app_upload_needs_image.txt
Last active December 1, 2017 02:10
iOS 上传所需基本图片尺寸
/*
iOS上传所需基本图片
icon
● Icon.png – 57×57 iPhone应用图标
● Icon@2x.png – 114×114 iPhone Retina显示屏应用图标
● Icon-72.png – 72×72 iPad应用图标