Skip to content

Instantly share code, notes, and snippets.

View annidy's full-sized avatar
💭
I may be slow to respond.

fengxing annidy

💭
I may be slow to respond.
View GitHub Profile
@annidy
annidy / notepad2.py
Created September 28, 2012 03:58
反文件透明加密
# -*- coding:utf-8 -*-
from pydbg import *
from pydbg.defines import *
import os
import sys
__author__ = 'fengxing <anndiy(at)gmail.com>'
__date__ = '2012-9-28'
def handler_MapViewOfFile(dbg):
@annidy
annidy / y2k_words.py
Last active December 14, 2015 23:39
有道单词本转换为金山单词本
# -*- 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 December 19, 2015 17:39
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);
# 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 August 16, 2016 12:44
sqlite变长整数
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 / png_hunter.py
Last active December 20, 2015 13:19
png资源提取器
#!/usr/bin/python
import os
import sys
import struct
ifp = sys.stdin
pngcount = 0
filename = ""
def findstart():
# 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 August 15, 2013 03:47
NSCalendar示例
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 December 21, 2015 15:39
lua扩展一般makefile
# http://lua-users.org/wiki/BuildingModules
TARGET = "mytest.so"
all:
gcc -c *.c
gcc -bundle -undefined dynamic_lookup *.o -o $(TARGET)
.PHONY : all
@annidy
annidy / AssetSource.m
Last active December 22, 2015 17:08
监视相册变化
//
// AssetSource.m
// CameraWathcher
//
// Created by FengXing on 13-9-9.
// Copyright (c) 2013年 FengXing. All rights reserved.
//
#import "AssetSource.h"