Skip to content

Instantly share code, notes, and snippets.

@littleV
littleV / genesis.py
Created December 7, 2018 21:33
Genesis
import random
import sys
def random01():
return random.randint(0,1)
# if 1+1 !=2 is false, it's easy, everything is normal
# but if 1+1 != 2 is true, what value should it be?
def baseRuleWhenOneMeetOne():
# In binary
@littleV
littleV / Cache.m
Created September 28, 2018 18:34
Cache.m
#import "Cache.h"
#import <WebKit/Webkit.h>
static NSInteger expireCacheMilliSeconds = 300000; // expire content cached longer than 5 minutes
@interface CacheOperation : NSOperation <UIWebViewDelegate, WKNavigationDelegate>
{
BOOL executing;
BOOL finished;
}