Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

fengxing annidy

💭
I may be slow to respond.
Block or report user

Report or block annidy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@annidy
annidy / wssign.py
Last active Oct 13, 2015
A script for morning signin
View wssign.py
# -*- coding:utf-8 -*-
import urllib2
import urllib
import sys
import re
__author__ = "annidy@gmail.com"
__date__ = "2011-4-10"
SERVER = 'http://wps.example.cn'
@annidy
annidy / y2k_words.py
Last active Dec 14, 2015
有道单词本转换为金山单词本
View y2k_words.py
# -*- coding: utf8 -*-
# author: [annidy](http://blog.csdn.net/ani_di)
# date: 2013.3.15
#
# 有道单词本转换为金山单词本
#
from __future__ import print_function
from xml.dom import minidom
import getopt, sys
@annidy
annidy / nettime.lua
Last active Dec 19, 2015
Lua网络校时
View nettime.lua
#include <stdio.h>
#include <string.h>
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#include <time.h>
#include <Windows.h>
int load(lua_State* L, const char* func, unsigned int* utc) {
lua_getglobal(L, func);
View gist:6025986
# Very alpha still, but getting there...
# Yeah, I like it this way
require 'pp'
require 'set'
require 'zlib'
require 'base64'
require 'socket'
require 'openssl'
require 'stringio'
@annidy
annidy / varint.lua
Last active Aug 16, 2016
sqlite变长整数
View varint.lua
function varint_decode(...)
t = 0
l = 0
for _, i in ipairs{...} do
t = t*128 + bit32.extract(i, 0, 7)
l = l + 1
if bit32.btest(i, 7) == false then
break
end
end
@annidy
annidy / parseUrl.lua
Last active Dec 20, 2015
lua解析url,面试题
View parseUrl.lua
#!/usr/bin/lua
-- url: ?abc=def&ghi=jkl&mno=pqr
function parseUrl(url)
ks = 0
for i = 2, #url do
t = url:sub(i, i)
if ks < 1 then
ks = i
end
@annidy
annidy / png_hunter.py
Last active Dec 20, 2015
png资源提取器
View png_hunter.py
#!/usr/bin/python
import os
import sys
import struct
ifp = sys.stdin
pngcount = 0
filename = ""
def findstart():
View projects
# Objective-C most watched repositories
[link](https://github.com/languages/Objective-C/most_watched)
* [three20](https://github.com/facebook/three20)
**faebook的320库**
* [AFNetworking](https://github.com/AFNetworking/AFNetworking)
**网络库**
@annidy
annidy / NSCalendar.m
Created Aug 15, 2013
NSCalendar示例
View NSCalendar.m
NSDate *date = [NSDate date];
NSCalendar *calendar = [NSCalendar currentCalendar];
NSDateComponents *comps;
// 年月日获得
comps = [calendar components:(NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit)
fromDate:date];
NSInteger year = [comps year];
NSInteger month = [comps month];
NSInteger day = [comps day];
@annidy
annidy / makefile
Last active Dec 21, 2015
lua扩展一般makefile
View makefile
# http://lua-users.org/wiki/BuildingModules
TARGET = "mytest.so"
all:
gcc -c *.c
gcc -bundle -undefined dynamic_lookup *.o -o $(TARGET)
.PHONY : all
You can’t perform that action at this time.