Skip to content

Instantly share code, notes, and snippets.

View bizbin's full-sized avatar
🌴
On vacation

bizbin bizbin

🌴
On vacation
View GitHub Profile
@yanzhihong23
yanzhihong23 / pm2-guard.js
Created April 28, 2017 10:24
pm2 cpu guard
'use strict';
const later = require('later');
const logger = require('./logger')('guard');
const pm2 = require('pm2');
const schedule = later.parse.recur().every(10).second();
// set local timezone
later.date.localTime();
@benlodotcom
benlodotcom / ClearApplicationCache.m
Last active April 13, 2017 09:41
Methods to flush the HTML5 Application Cache on iOS. In a UIWebView Webkit uses an sqlite database to store the resources associated to a cache manifest, as there is no API yet to flush the Application Cache you can use this method which delete entries directly from the database. However, this approach could break anytime if the implementation o…
static NSString *cacheDatabaseName = @"ApplicationCache.db";
static NSString *cacheGroupTable = @"CacheGroups";
static NSString *cacheGroupTableManifestURLColums = @"manifestURL";
static NSString *cacheTable = @"Caches";
static NSString *cacheTableCacheGroupId = @"cacheGroup";
/**
Clears the cached resources associated to a cache group.
@param manifestURLs An array of `NSString` containing the URLs of the cache manifests for which you want to clear the resources.
@TonnyXu
TonnyXu / RVi.md
Created August 3, 2012 07:49
About RVI(Remote Virtual Interface)

What is RVI?

RVI = Remote Virtual Interface

What RVI can do?

Using RVI, you can capture network packages in iOS using any normal package capturing tools like tcpdump etc.

Wire your rvi to Mac