Skip to content

Instantly share code, notes, and snippets.

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

Kevin kevinzhow

🏠
正在搬砖
View GitHub Profile
#!/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__
@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 可以做的操作有:

Yep API Reference

概述

  • 基于 HTTP
  • RESTful
  • 采用标准 HTTP Code 返回错误
  • 返回格式为 JSON
@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"/>
#!/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
#/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
@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
@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 / VerticalLayout.swift
Created March 7, 2015 06:41
VerticalLayout
//
// DiaryVerticalTextView.swift
// Diary
//
// Created by kevinzhow on 15/3/6.
// Copyright (c) 2015年 kevinzhow. All rights reserved.
//
import UIKit
import CoreText
@kevinzhow
kevinzhow / gist:984f55af8b6c901814b1
Last active September 17, 2016 10:32
iptables_ipsec_pptp.rules
#!/bin/sh
# Flush old rules, old custom tables
/sbin/iptables --flush
/sbin/iptables --flush -t nat
/sbin/iptables --delete-chain
# Set default policies for all three default chains
/sbin/iptables -P INPUT DROP
/sbin/iptables -P FORWARD DROP