The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
var templateLoader = (function($,host){ | |
//Loads external templates from path and injects in to page DOM | |
return{ | |
loadExtTemplate: function(path){ | |
var tmplLoader = $.get(path) | |
.success(function(result){ | |
//Add templates to DOM | |
$("body").append(result); | |
}) | |
.error(function(result){ |
- (UIViewController *)topViewController{ | |
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; | |
} | |
- (UIViewController *)topViewController:(UIViewController *)rootViewController | |
{ | |
if (rootViewController.presentedViewController == nil) { | |
return rootViewController; | |
} | |
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
kCFURLErrorUnknown = -998, | |
kCFURLErrorCancelled = -999, | |
kCFURLErrorBadURL = -1000, | |
kCFURLErrorTimedOut = -1001, | |
kCFURLErrorUnsupportedURL = -1002, | |
kCFURLErrorCannotFindHost = -1003, | |
kCFURLErrorCannotConnectToHost = -1004, | |
kCFURLErrorNetworkConnectionLost = -1005, | |
kCFURLErrorDNSLookupFailed = -1006, | |
kCFURLErrorHTTPTooManyRedirects = -1007, |
sudo vim /etc/postfix/sasl_passwd
@implementation NSBundle (MYBundle) | |
+ (instancetype)MYBundle{ | |
NSBundle *mainBundle = [NSBundle mainBundle]; | |
NSURL *bundleUrl = [mainBundle URLForResource:@"MyBundle" withExtension:@"bundle"]; | |
NSBundle *bundle = [NSBundle bundleWithURL:bundleUrl]; | |
return bundle; | |
} | |
+ (UIImage*)imageNamed:(NSString*)name{ | |
UIImage *image; |
Copyright 2017 Guillermo Gonzalez
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE U
We'll share session notes in QQ group 367375164 2 PM on weekdays.
import Foundation | |
protocol StateType: Hashable {} | |
protocol EventType: Hashable {} | |
struct Transition<S: StateType, E: EventType> { | |
let event: E | |
let fromState: S | |
let toState: S |
{ | |
"emojis": [ | |
{"emoji": "👩👩👧👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""}, | |
{"emoji": "👩👩👧👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""}, | |
{"emoji": "👩👩👦👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""}, | |
{"emoji": "👨👩👧👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z |