This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let emojis: [String: [String]] = [ | |
| // +[EMFEmojiCategory TravelAndPlacesEmoji] | |
| "travel": ["🚗", "🚕", "🚙", "🚌", "🚎", "🏎", "🚓", "🚑", "🚒", "🚐", "🚚", "🚛", "🚜", "🛴", "🚲", "🛵", "🏍", "🚨", "🚔", "🚍", "🚘", "🚖", "🚡", "🚠", "🚟", "🚃", "🚋", "🚞", "🚝", "🚄", "🚅", "🚈", "🚂", "🚆", "🚇", "🚊", "🚉", "🚁", "🛩", "✈️", "🛫", "🛬", "🚀", "🛰", "💺", "🛶", "⛵️", "🛥", "🚤", "🛳", "⛴", "🚢", "⚓️", "🚧", "⛽️", "🚏", "🚦", "🚥", "🗺", "🗿", "🗽", "⛲️", "🗼", "🏰", "🏯", "🏟", "🎡", "🎢", "🎠", "⛱", "🏖", "🏝", "⛰", "🏔", "🗻", "🌋", "🏜", "🏕", "⛺️", "🛤", "🛣", "🏗", "🏭", "🏠", "🏡", "🏘", "🏚", "🏢", "🏬", "🏣", "🏤", "🏥", "🏦", "🏨", "🏪", "🏫", "🏩", "💒", "🏛", "⛪️", "🕌", "🕍", "🕋", "⛩", "🗾", "🎑", "🏞", "🌅", "🌄", "🌠", "🎇", "🎆", "🌇", "🌆", "🏙", "🌃", "🌌", "🌉", "🌁"], | |
| // +[EMFEmojiCategory NatureEmoji] | |
| "nature": ["🐶", "🐱", "🐭", "🐹", "🐰", "🦊", "🐻", "🐼", "🐨", "🐯", "🦁", "🐮", "🐷", "🐽", "🐸", "🐵", "🙈", "🙉", "🙊", "🐒", "🐔", "🐧", "🐦", "🐤", "🐣", "🐥", "🦆", "🦅", "🦉", "🦇", "🐺", "🐗", "🐴", "🦄", "🐝", "🐛", "🦋", "🐌", "🐚", "🐞", "🐜", "🕷", "🕸", "🐢", "🐍", "🦎", "🦂", "🦀", "🦑", "🐙", "🦐", "🐠", "🐟", "🐡", "🐬", "🦈 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface UIApplication(InternalAppAdditions) | |
| - (void)terminateWithSuccess; | |
| @end | |
| #warning: This is private API. Do not try to submit this line to TestFlight or the App Store. | |
| [[UIApplication sharedApplication] terminateWithSuccess]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # blog post | |
| # | |
| # https://www.jessesquires.com/blog/customizing-git-log/ | |
| git log --graph --pretty=format:'commit: %C(bold red)%h%Creset %C(red)<%H>%Creset %C(bold magenta)%d %Creset%ndate: %C(bold yellow)%cd %Creset%C(yellow)%cr%Creset%nauthor: %C(bold blue)%an%Creset %C(blue)<%ae>%Creset%n%C(cyan)%s%n%Creset' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // GetAppIcon.swift | |
| // | |
| // Get the AppIcon from Assets and return it as a UIImage | |
| // Created by Stephen Mullen | |
| // | |
| import UIKit | |
| func getAppIcon() -> UIImage { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // Operators.swift | |
| // FastParsing | |
| // | |
| // Created by Chris Eidhof on 26/12/2016. | |
| // Copyright © 2016 objc.io. All rights reserved. | |
| // | |
| // TODO: give appropriate credit. Many parts were stolen from SwiftParsec. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSDate *date = [NSDate new]; | |
| NSDateFormatter *dateFormatter = [NSDateFormatter new]; | |
| dateFormatter.locale = [NSLocale localeWithLocaleIdentifier:@"nl_NL"]; | |
| dateFormatter.dateStyle = NSDateFormatterFullStyle; | |
| dateFormatter.formattingContext = NSFormattingContextDynamic; // this is the important setting | |
| NSString *dateString = [dateFormatter stringFromDate:date]; | |
| NSString *s1 = [NSString stringWithFormat:@"Foo %@", dateString]; // "Foo dinsdag 13 december 2016" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| An Observable emits values to its subscribed observers. | |
| A minimal implementation based upon the reactivex specification: | |
| http://reactivex.io/documentation/observable.html | |
| */ | |
| public class Observable<Value> { | |
| /** Add a new observer. The provided instance will receive all values provided to onNext. */ | |
| public func subscribe(_ observer: @escaping (Value) -> Void) -> Observable<Value> { | |
| observers.append(observer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //: | |
| //: UserDefaultable.swift | |
| //: | |
| //: Created by Andyy Hope on 18/08/2016. | |
| //: Twitter: @andyyhope | |
| //: Medium: Andyy Hope, https://medium.com/@AndyyHope | |
| import Foundation | |
| // MARK: - Key Namespaceable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //: # Swift 3: Base64 encoding and decoding | |
| import Foundation | |
| extension String { | |
| //: ### Base64 encoding a string | |
| func base64Encoded() -> String? { | |
| if let data = self.data(using: .utf8) { | |
| return data.base64EncodedString() | |
| } | |
| return nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //DNS Query Program on Linux | |
| //Author : Silver Moon (m00n.silv3r@gmail.com) | |
| //Dated : 29/4/2009 | |
| //Header Files | |
| #include<stdio.h> //printf | |
| #include<string.h> //strlen | |
| #include<stdlib.h> //malloc | |
| #include<sys/socket.h> //you know what this is for | |
| #include<arpa/inet.h> //inet_addr , inet_ntoa , ntohs etc |
NewerOlder