Install the two dependencies, ImageMagick and Ghostscript.
$ brew install imagemagick
$ brew install ghostscript| // Creates a UIColor from a Hex string. | |
| func colorWithHexString (hex:String) -> UIColor { | |
| var cString:String = hex.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()).uppercaseString | |
| if (cString.hasPrefix("#")) { | |
| cString = cString.substringFromIndex(1) | |
| } | |
| if (countElements(cString) != 6) { | |
| return UIColor.grayColor() | 
| - (NSString *)stringFromCount:(NSUInteger)count | |
| { | |
| NSString *days = nil; | |
| NSUInteger modulo10 = count % 10; | |
| if (modulo10 == 1) | |
| { | |
| days = NSLocalizedString(@"день", nil); | |
| } | |
| if (modulo10 == 2 || modulo10 == 3 || modulo10 == 4) | |
| { | 
| // | |
| // TCHorizontalSelectorView.m | |
| // TwinCodersLibrary | |
| // | |
| // Created by Guillermo Gutiérrez on 16/01/13. | |
| // Copyright (c) 2013 TwinCoders S.L. All rights reserved. | |
| // | |
| #import <UIKit/UIKit.h> | 
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| ACAccountStore * const accountStore = [ACAccountStore new]; | |
| ACAccountType * const accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; | |
| [accountStore requestAccessToAccountsWithType:accountType options:@{ | |
| ACFacebookAppIdKey: @"-snip-" | |
| } completion:^(BOOL granted, NSError *error) { | |
| if (!granted) { | |
| switch (error.code) { | |
| case ACErrorAccountNotFound: { | |
| dispatch_async(dispatch_get_main_queue(), ^{ | 
| data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> | |
| <!-- | |
| For other language: Instead of `ace/mode/ruby`, Use | |
| Markdown -> `ace/mode/markdown` | |
| Python -> `ace/mode/python` | |
| C/C++ -> `ace/mode/c_cpp` | |
| Javscript -> `ace/mode/javascript` | |
| Java -> `ace/mode/java` | |
| Scala- -> `ace/mode/scala` |