Skip to content

Instantly share code, notes, and snippets.

View kevinzhow's full-sized avatar
🏠
正在搬砖

Kevin kevinzhow

🏠
正在搬砖
View GitHub Profile
@kevinzhow
kevinzhow / vpnserver.sh
Last active March 19, 2019 12:59
OnClickVPNServer
#!/usr/bin/env bash
echo 'deb http://shadowsocks.org/debian wheezy main' >> /etc/apt/sources.list
# Pre-requisites
sudo apt-get -y update
sudo apt-get -y install pptpd
sudo apt-get -y install fail2ban
sudo apt-get -y install shadowsocks-libev
@kevinzhow
kevinzhow / skill.swift
Last active November 28, 2015 13:08
CoreGraphic Draw
func genSkillImageWithSkills(skills: [Skill]) -> UIImage {
let maxWidth:CGFloat = 170
let marginTop:CGFloat = 3.0
let marginLeft: CGFloat = 6.0
let lineSpacing: CGFloat = 5.0
#/bin/bash
export PATH="/bin:/sbin:/usr/sbin:/usr/bin"
OLDGW=192.168.0.1
route add -net 1.0.1.0 netmask 255.255.255.0 gw $OLDGW
route add -net 1.0.2.0 netmask 255.255.254.0 gw $OLDGW
route add -net 1.0.8.0 netmask 255.255.248.0 gw $OLDGW
route add -net 1.0.32.0 netmask 255.255.224.0 gw $OLDGW
route add -net 1.1.0.0 netmask 255.255.255.0 gw $OLDGW
#!/bin/bash
export PATH="/bin:/sbin:/usr/sbin:/usr/bin"
OLDGW=`cat /tmp/vpn_oldgw`
route del -net 1.0.1.0 netmask 255.255.255.0
route del -net 1.0.2.0 netmask 255.255.254.0
route del -net 1.0.8.0 netmask 255.255.248.0
route del -net 1.0.32.0 netmask 255.255.224.0
@kevinzhow
kevinzhow / MainView.ux
Created December 20, 2015 08:21
Fuse ScrollView
<App Theme="Basic">
<JavaScript File="main.js" />
<ScrollView Padding="30" ScrollPositionChanged="{Say}">
<StackPanel ItemSpacing="20">
<Each Items="{people}">
<Rectangle>
<Stroke Width="2" Brush="#000" />
<StackPanel ItemSpacing="5" Margin="10">
<Text Value="{name}" FontSize="20" TextColor="#000" Margin="0"/>
<Text Value="{age}" TextColor="#aaa"/>

Yep API Reference

概述

  • 基于 HTTP
  • RESTful
  • 采用标准 HTTP Code 返回错误
  • 返回格式为 JSON
@kevinzhow
kevinzhow / yep_faye.markdown
Created January 8, 2016 06:47
Yep Faye API

Faye Server API Reference

说明

此为 Faye Server v1 文档,Faye Server 是使用 Faye 框架的基于 Bayeux 协议的消息系统。

客户端在 Faye Server 可以做的操作有:

#!/bin/bash
export MACOSX_DEPLOYMENT_TARGET="10.9"
: << '#__REM__'
指定さたライブラリをiOS用にフルオートで作成します。ダウンロード、複数のアーキテクチャのビルドも自動的に行います。デフォルトではi386、x86_64、armv7、armv7s、arm64のアーキテクチャを作成します。
Create a full-auto to iOS for the library specified. I do also builds the architecture download, more than one. Create architecture i386, x86_64, armv7, armv7s, arm64 by default.
#__REM__
This file has been truncated, but you can view the full file.
server=/.0-6.com/202.106.196.115
server=/.0-gold.net/202.106.196.115
server=/.00.net/202.106.196.115
server=/.0000738.com/202.106.196.115
server=/.0001688.com/202.106.196.115
server=/.000219.com/202.106.196.115
server=/.0007.net/202.106.196.115
server=/.000dn.com/202.106.196.115
server=/.000e.com/202.106.196.115
server=/.000w.net/202.106.196.115
Stack trace[Hide framework code]
org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
….apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
…erxml.jackson.core.json.UTF8JsonGenerator._flushBuffer(UTF8JsonGenerator.java:2003)