- You're running iOS/iPadOS 14.
- You've installed Scriptable (https://scriptable.app).
- You own a WeatherFlow weather station.
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
This file contains 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
exists(A, list(A, _, _, _, _)). | |
exists(A, list(_, A, _, _, _)). | |
exists(A, list(_, _, A, _, _)). | |
exists(A, list(_, _, _, A, _)). | |
exists(A, list(_, _, _, _, A)). | |
rightOf(R, L, list(L, R, _, _, _)). | |
rightOf(R, L, list(_, L, R, _, _)). | |
rightOf(R, L, list(_, _, L, R, _)). | |
rightOf(R, L, list(_, _, _, L, R)). |
This file contains 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
@import WatchKit; | |
#import <ReactiveCocoa/ReactiveCocoa.h> | |
@interface WKInterfaceController (Reactive) | |
@property (nonatomic, readonly) RACSignal *activatedSignal; | |
@property (nonatomic, readonly) RACSignal *deactivatedSignal; | |
@property (nonatomic, readonly) RACSignal *didPresentControllerSignal; | |
@property (nonatomic, readonly) RACSignal *didPushControllerSignal; |
This file contains 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
git stash && git fetch origin && git reset --hard origin/master |
This file contains 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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
This file contains 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
import time | |
def RateLimited(maxPerSecond): | |
minInterval = 1.0 / float(maxPerSecond) | |
def decorate(func): | |
lastTimeCalled = [0.0] | |
def rateLimitedFunction(*args,**kargs): | |
elapsed = time.clock() - lastTimeCalled[0] | |
leftToWait = minInterval - elapsed | |
if leftToWait>0: |