# I'll be doing another one for Linux, but this one will give you | |
# a pop up notification and sound alert (using the built-in sounds for macOS) | |
# Requires https://github.com/caarlos0/timer to be installed | |
# Mac setup for pomo | |
alias work="timer 60m && terminal-notifier -message 'Pomodoro'\ | |
-title 'Work Timer is up! Take a Break 😊'\ | |
-appIcon '~/Pictures/pumpkin.png'\ | |
-sound Crystal" |
pipelines: | |
branches: | |
develop: | |
- step: | |
name: Update | |
script: | |
- apt-get update | |
- apt-get -y install jq zip | |
- FILE_NAME=crx.zip | |
- zip -r $FILE_NAME ./app |
/* | |
RUN THE SCRIPT BY YOURSELF: | |
- Run `node paddle-revenue.js` on your server and let it run 24/7. | |
- Access the API at http://your_server_ip:8175/ (JSON) | |
HOSTED VERSION: | |
If you don't want to run the script by your own, you can use the | |
hosted version. The price is $5 per month per Paddle account. | |
Here is how: |
# A Best in Class Checklist | |
A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10. | |
> To use this, create a Github Issue in your own repo, and simply copy and paste this text. | |
## iOS Core Technology | |
_Things any iOS app can benefit from_ | |
- [ ] iCloud Sync | |
- [ ] [Core Spotlight integration](https://github.com/DreamingInBinary/Spend-Stack/issues/120) |
import Foundation | |
struct Promise<T> { | |
typealias ResultType = Result<T, Error> | |
typealias ResultObserver = (ResultType) -> Void | |
typealias CreatorFunction = (@escaping ResultObserver) -> Void | |
private let creatorFunction: CreatorFunction | |
init(creatorFunction: @escaping CreatorFunction) { | |
self.creatorFunction = creatorFunction |
// #!Swift-1.1 | |
import Foundation | |
// MARK: - (1) classes | |
// Solution 1: | |
// - Use classes instead of struct | |
// Issue: Violate the concept of moving model to the value layer | |
// http://realm.io/news/andy-matuschak-controlling-complexity/ |
The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).
My take-aways are:
-
You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.
-
Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse
Translated from https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-mostly-complete-guide-to-react-rendering-behavior/, author: Mark Erikson (from Redux team)
Bài viết cung cấp chi tiết về cách mà React render hoạt động, và việc sử dụng Context và Redux ảnh hưởng thế nào tới quá trình render của React.
Rendering is the process of React asking your components to describe what they want their section of the UI to look like, now, based on the current combination of props and state.