brew install go --cross-compile-common
export GOROOT=/usr/local/opt/go/libexec
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>1 1 1 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>SFMono-Bold - 11.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>1 1 1 1</string> |
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Use - sudo gem update --system
#Remove this line after copying the following to ~/Library/Developer/Xcode/UserData/FontAndColorThemes/SolarizedDark.xccolortheme | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0.513725 0.580392 0.588235 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Menlo-Regular - 11.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> |
ext { | |
// Assumes Git is in your PATH | |
commitCount = { | |
return 'git rev-list --count HEAD'.execute().text.trim() | |
} | |
gitSha = { | |
return 'git rev-parse --short HEAD'.execute().text.trim() | |
} |
import UIKit | |
protocol ImageDownloadProtocol { | |
func downloadImage(from url: URL, completion: @escaping (UIImage?) -> Void) | |
} | |
extension ImageDownloadProtocol { | |
func downloadImage(from url: URL, completion: @escaping (UIImage?) -> Void) { | |
let session = URLSession(configuration: .default) | |
DispatchQueue.global(qos: .background).async { |
extension KeyedDecodingContainer { | |
func decodeIfPresentAndNotNullString<T>(_ type: T.Type, forKey key: Key) throws -> T? where T: Decodable { | |
do { | |
return try decodeIfPresent(type, forKey: key) | |
} catch { | |
if let valueAsString = try decodeIfPresent(String.self, forKey: key), valueAsString == "<null>" { | |
return nil | |
} else { | |
throw error | |
} |
// Via @layoutSubviews in /dev/world2019 | |
func tableView( _ tableView : UITableView, didSelectRowAt indexPath: IndexPath ) { | |
let cell = tableView.cellForRowAt( indexPath) as! MyCell | |
// Make some changes that affect the layout. Doing this but nothing else will cause clipped content. | |
cell.label.fontSize = 100 | |
// We have to force the table view to recalculate the cell size and update the UI | |
tableView.beginUpdates() | |
tableView.endUpdates() | |
} |
Based on this dribbble shot: https://dribbble.com/shots/1818748-Appon-Chat-Widget. Search field is functional. You can also add your own messages to the chat window! A random response will be given :)
A Pen by Indrajit Chakrabarty on CodePen.