📅 Write: 2020/02/03
✅ Before you follow this tutorial, create the Next.js project first.
📅 Write: 2020/02/03
✅ Before you follow this tutorial, create the Next.js project first.
FROM php:7.1.2-apache | |
RUN docker-php-ext-install mysqli |
brew install nginx
sudo cp /usr/local/Cellar/nginx/1.8.0/homebrew.mxcl.nginx.plist /Library/LaunchAgents
Replace /usr/local/etc/nginx/nginx.conf
with the nginx.conf
in this gist. I'm using port 5000 for my current project. Obviously, change server_name
as well, and probably the name of its access log.
Reposted from Qiita
For almost a year now, I've been using this "flux" architecture to organize my React applications and to work on other people's projects, and its popularity has grown quite a lot, to the point where it shows up on job listings for React and a lot of people get confused about what it is.
There are a billion explainations on the internet, so I'll skip explaining the parts. Instead, let's cut to the chase -- the main parts I hate about flux are the Dispatcher and the Store's own updating mechanism.
If you use a setup similar to the examples in facebook/flux, and you use flux.Dispatcher, you probably have this kind of flow:
/* OpenSimplex Noise in C# | |
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19 | |
* and heavily refactored to improve performance. */ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
namespace NoiseTest |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// sign up | |
account.signUp('[email protected]', 'secret'); | |
// sign in | |
account.signIn('[email protected]', 'secret'); | |
// sign in via oauth | |
account.signInWith('twitter'); | |
// sign out |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs