A curated list of shell commands and tools specific to macOS.
“You don’t have to know everything. You simply need to know where to find it when necessary.” (John Brunner)
If you want to contribute, you are highly encouraged to do so. Please read the
| #import <React/RCTViewManager.h> | |
| @interface RCT_EXTERN_MODULE(CounterManager, RCTViewManager) | |
| RCT_EXPORT_VIEW_PROPERTY(value, NSNumber) | |
| RCT_EXPORT_VIEW_PROPERTY(leftButtonText, NSString) | |
| RCT_EXPORT_VIEW_PROPERTY(rightButtonText, NSString) | |
| RCT_EXPORT_VIEW_PROPERTY(onPressLeftButton, RCTDirectEventBlock) | |
| RCT_EXPORT_VIEW_PROPERTY(onPressRightButton, RCTDirectEventBlock) |
| # USAGE: | |
| # notify pod install --repo-update | |
| # Place this function at the end of your file | |
| notify() { | |
| body="" | |
| for parameter in $@ | |
| do | |
| body+=" $parameter" | |
| done |
What is an Observable
How to create an Observable:
just| Banco do Brasil = "bbapp://" | |
| Bradesco = "BDNiPhoneVarejo://" | |
| Bradesco Prime = "BDNiPhonePrime://" | |
| Itaú = "itauvarejo://" | |
| Itaú Personnalité = "itaupersonnalite://" | |
| Santander = "santanderpf://" | |
| Sicoob = "sicoob://" | |
| Neon = "banconeon://" | |
| Nubank = "nuapp://" |
| //Function to pretty-print Json Object in Swift 3 | |
| func prettyPrint(with json: [String:Any]) -> String{ | |
| let data = try! JSONSerialization.data(withJSONObject: json, options: .prettyPrinted) | |
| let string = NSString(data: data, encoding: String.Encoding.utf8.rawValue) | |
| return string as! String | |
| } |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'
Example: To get json record having _id equal 611
cat my.json | jq -c '.[] | select( ._id | contains(611))'Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)
| <?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>ANSIBlackColor</key> | |
| <data> | |
| YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS | |
| AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw | |
| LjE0NTA5ODAzOTIgMC4xNDkwMTk2MDc4IDAuMTg4MjM1Mjk0MQAQAYAC0hAREhNaJGNs | |
| YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp |
Following the tradition from last year, here's my complete list of all interesting features and updates I could find in Apple's OSes, SDKs and developer tools that were announced at this year's WWDC. This is based on the keynotes, the "What's New In ..." presentations and some others, Apple's release notes, and blog posts and tweets that I came across in the last few weeks.
If for some reason you haven't watched the talks yet, I really recommend watching at least the "State of the Union" and the "What's New In" intros for the platforms you're interested in. The unofficial WWDC Mac app is great way to download the videos and keep track of what you've already watched.
If you're interested, here are my WWDC 2015 notes (might be useful if you're planning to drop support for iOS 8 now and start using some iOS 9 APIs).