Skip to content

Instantly share code, notes, and snippets.

View 0x5e's full-sized avatar

gaosen 0x5e

  • China, Zhejiang, Hangzhou
  • 16:25 (UTC +08:00)
View GitHub Profile
@0x5e
0x5e / fake_icloud.py
Created July 21, 2016 14:23
钓鱼网站假数据填充器
#!/usr/bin/env python
# coding=utf-8
# find my iphone 钓鱼网站
import string, random
import requests
import time
import socket, struct
import thread, threading
from Queue import Queue
@0x5e
0x5e / SingletonMarco.h
Last active January 18, 2016 03:09
非线程安全,避免生成多个实例
#define SINGLETON(__class) \
+ (instancetype)sharedInstance;
#define DEF_SINGLETON(__class) \
static __class * __singleton__ = nil; \
+ (instancetype)sharedInstance { \
static dispatch_once_t once; \
dispatch_once(&once, ^{ \
__singleton__ = [[super allocWithZone:NULL] init]; \
}); \