Skip to content

Instantly share code, notes, and snippets.

View caoer's full-sized avatar
🎯
Focusing as always

Zitao Xiong caoer

🎯
Focusing as always
View GitHub Profile
silent! let g:plugs['BufOnly.vim'].commit = '43dd923'
silent! let g:plugs['CamelCaseMotion'].commit = '26f896d'
silent! let g:plugs['DidYouMean'].commit = 'd2fc2a9'
silent! let g:plugs['badwolf'].commit = '78a3e35'
silent! let g:plugs['codi.vim'].commit = '275636d'
silent! let g:plugs['colorizer'].commit = '9d6dc32'
silent! let g:plugs['ctrlsf.vim'].commit = '01260f1'
silent! let g:plugs['deoplete-flow'].commit = '1abd167'
silent! let g:plugs['deoplete-ternjs'].commit = 'c8135f6'
silent! let g:plugs['deoplete.nvim'].commit = '106ad23'
### Keybase proof
I hereby claim:
* I am caoer on github.
* I am zitao (https://keybase.io/zitao) on keybase.
* I have a public key whose fingerprint is C034 3A2D D055 CD86 39A3 DEF5 0528 9B7B 8BF9 AEFD
To claim this, I am signing this object:

Smiley Face

@caoer
caoer / README-Template.md
Created August 10, 2016 18:34 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisities

@caoer
caoer / installed_apps.m
Created July 22, 2016 19:24
find all installed apps
Class c = NSClassFromString(@"LSApplicationWorkspace");
id s = [(id) c performSelector:NSSelectorFromString(@"defaultWorkspace")];
NSArray *arr = [s performSelector:NSSelectorFromString(@"allInstalledApplications")];
for (id item in arr) {
NSLog(@"appId:%@", [item performSelector:NSSelectorFromString(@"applicationIdentifier")]);
NSLog(@"bundleVer:%@", [item performSelector:NSSelectorFromString(@"bundleVersion")]);
NSLog(@"shortVer:%@", [item performSelector:NSSelectorFromString(@"shortVersionString")]);
}
@caoer
caoer / ioslocaleidentifiers.csv
Last active September 16, 2015 22:37 — forked from jacobbubu/ioslocaleidentifiers.csv
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
dulicatedColorMethod(T0, Bg03);
dulicatedColorMethod(T1, Bg04);
dulicatedColorMethod(T2, Bg05);
dulicatedColorMethod(T3, Bg06);
dulicatedColorMethod(T4, Bg07);
dulicatedColorMethod(T5, Bg10);
cachedColorMethod(CtrlPrimary0 , 3 / 255.0 , 83 / 255.0 , 254 / 255.0 , 1)
cachedColorMethod(CtrlPrimary1 , 32 / 255.0 , 133 / 255.0 , 251 / 255.0 , 1)
cachedColorMethod(CtrlSecondary0 , 126 / 255.0 , 136 / 255.0 , 157 / 255.0 , 1)
cachedColorMethod(CtrlSecondary1 , 179 / 255.0 , 189 / 255.0 , 208 / 255.0 , 1)
for f in *.aud; do echo '#!AMR' | cat - $f > $f.amr; done
for f in *.pic_hd; do mkdir -p convert; cp $f convert/$f.jpg; done
@caoer
caoer / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
for (int i = 0; i < 30; i++) {
__block __weak id ob1 = nil;
__block __weak id ob2 = nil;
void (^block)(NSNotification *) = ^(NSNotification *note) {
NSLog(@"got noti %@, ob1: %@, ob2: %@", note.name, ob1, ob2);
[[NSNotificationCenter defaultCenter] removeObserver:ob1];
[[NSNotificationCenter defaultCenter] removeObserver:ob2];
};