One Paragraph of project description goes here
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.
import sublime, sublime_plugin, os | |
class ExpandSelectionToDelimsCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
begindelims = ["\"", "\'", "(", "<", "[", "{"] | |
enddelims = ["\"", "\'", ")", ">", "]", "}"] | |
view = self.view | |
oldSelRegions = list(view.sel()) | |
for thisregion in oldSelRegions: | |
thisRegionBegin = thisregion.begin() - 1 |
" copy all this into a vim buffer, save it, then... | |
" source the file by typing :so % | |
" Now the vim buffer acts like a specialized application for mastering vim | |
" There are two queues, Study and Known. Depending how confident you feel | |
" about the item you are currently learning, you can move it down several | |
" positions, all the way to the end of the Study queue, or to the Known | |
" queue. | |
" type ,, (that's comma comma) |
#ifdef DEBUG | |
//Lumberjack | |
DDTTYLogger *log = [DDTTYLogger sharedInstance]; | |
// we also enable colors in Xcode debug console | |
// because this require some setup for Xcode, commented out here. | |
// https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/XcodeColors | |
[log setColorsEnabled:YES]; */ | |
[log setForegroundColor:[UIColor orangeColor] backgroundColor:nil forFlag:LOG_FLAG_INFO]; | |
[log setForegroundColor:[UIColor redColor] backgroundColor:nil forFlag:LOG_FLAG_ERROR]; |
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]; | |
}; | |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 |
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) |
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) |
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")]); | |
} |