Skip to content

Instantly share code, notes, and snippets.

View litefeel's full-sized avatar
🎯
I may be slow to respond.

Xiaoqing Zhang litefeel

🎯
I may be slow to respond.
View GitHub Profile
@litefeel
litefeel / qcloud_porn_detect.py
Last active June 28, 2023 19:47
简单的腾讯鉴黄脚本
#!/usr/bin/python
# encoding=utf-8
# api
# https://www.qcloud.com/document/product/275/6101
import httplib, urllib
import json
import time
import base64
@litefeel
litefeel / readme.txt
Created December 17, 2016 13:11 — forked from knightao/readme.txt
shadowsocks 公共代理的必要设置
good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。
但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能)
本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考
https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks
1、 shadowsocks的timeout设置
超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。
2、 检查操作系统的各种限制
对于openvz的vps,特别需要检查一下
@litefeel
litefeel / debugIosOnLowXcode.txt
Created December 13, 2016 03:41
使用低版本Xcode调试高版本iOS
1. 下载高版本xcode并安装 例如名字为 Xcode-beta.app
2. 将高版本Xcode中的设备支持链接到低版本的Xcode中
~~~
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/$(iosVersion) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# 例如在低版本中指出ios10.2
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.2\ \(14C5062c\)/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
~~~
3. 重开低版本的Xcode就可以调试高版本IOS了
@litefeel
litefeel / xcode-build-bump-lastnum.sh
Last active September 29, 2016 07:22 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
oldnum=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")
if [[ ! -f "lastbuildnumber" ]]; then
echo $oldnum > "lastbuildnumber"
fi
lastnum=`cat lastbuildnumber`
#lastnum=fdsafd
echo "lastnum=${lastnum}"
@litefeel
litefeel / spam.lua
Last active August 27, 2016 04:00
lua版干扰屏蔽字编码解码
-- split utf8 char
function string.splitUtf8(str)
local list = {}
local p = 1
for i = 1, #str do
local c = string.byte(str, i)
if c < 0x80 then
-- ascii
table.insert(list, string.sub(str, p, i))
p = i + 1
@litefeel
litefeel / PbxModifier.cs
Last active September 7, 2016 03:47 — forked from keijiro/PbxModifier.cs
(Unity Xcode Manipulation API) An example which modifies compiler flags for a given source file.
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
using System.IO;
public class PbxModifier
{
[PostProcessBuild]
public static void OnPostprocessBuild(BuildTarget buildTarget, string path)
@litefeel
litefeel / FrameTaskExt.lua
Last active April 11, 2016 02:47
lua分帧处理任务,多用于显示对象创建
local FrameTaskExt = {}
FrameTaskExt.__index = FrameTaskExt
-- isFinish, isContinue function taskFunc(times)
function FrameTaskExt.new(taskFunc)
local o = {}
setmetatable(o, FrameTaskExt)
o:_init(taskFunc)
return o
end
// CameraFacing.cs
// original by Neil Carter (NCarter)
// modified by Hayden Scott-Baron (Dock) - http://starfruitgames.com
// allows specified orientation axis
using UnityEngine;
using System.Collections;
public class CameraFacing : MonoBehaviour
@litefeel
litefeel / BitmapChar.as
Created March 14, 2016 01:49 — forked from 7interactivestudio/BitmapChar.as
Bitmap Chars for Genome2D Font created with Littera ( http://kvazars.com/littera/ ) GBitmapFont Topic and Demo: http://forum.genome2d.com/viewtopic.php?f=6&t=111
/**
* Created by rodrigo on 12/14/13.
*/
package rodrigolopezpeker.genome2d.text {
import com.genome2d.textures.GTexture;
import flash.utils.Dictionary;
public class BitmapChar {
@litefeel
litefeel / utf8.lua
Created February 23, 2016 07:28
utf8len utf8sub
function string.utf8len(s)
if s == nil or s == "" then return 0 end
local n = 0
for i = 1, #s do
local c = string.byte(s, i)
if c < 0x80 or c >= 0xC0 then
n = n + 1
end
end