Skip to content

Instantly share code, notes, and snippets.

View iT-Boyer's full-sized avatar
🎯
Focusing

布衣男儿 iT-Boyer

🎯
Focusing
View GitHub Profile
@iT-Boyer
iT-Boyer / 0_reuse_code.js
Created July 8, 2014 03:00
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
NSAttributedString *attrString; // from previous code
NSDictionary *options = @{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType};
NSData *htmlData = [attrString dataFromRange:NSMakeRange(0, [attrString length]) documentAttributes:options error:nil];
NSString *htmlString = [[NSString alloc] initWithData:htmlData encoding:NSUTF8StringEncoding];