(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
sudo aptitude -y install nginx | |
cd /etc/nginx/sites-available | |
sudo rm default | |
sudo cat > jenkins | |
upstream app_server { | |
server 127.0.0.1:8080 fail_timeout=0; | |
} | |
server { | |
listen 80; |
public class EnumDropdownBuilder : ElementBuilder | |
{ | |
protected override bool matches(AccessorDef def) | |
{ | |
var type = def.Accessor.PropertyType; | |
return type.IsEnum; | |
} | |
public override HtmlTag Build(ElementRequest request) |
To remove a submodule you need to:
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
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
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
server { | |
listen 80; | |
server_name localhost; | |
root /usr/share/nginx/html; | |
location ~ /.+ { | |
try_files $uri $uri.html $uri =404; | |
} |
# Based on https://steveholgado.com/nginx-for-nextjs/ | |
# - /var/cache/nginx sets a directory to store the cached assets | |
# - levels=1:2 sets up a two‑level directory hierarchy as file access speed can be reduced when too many files are in a single directory | |
# - keys_zone=STATIC:10m defines a shared memory zone for cache keys named “STATIC” and with a size limit of 10MB (which should be more than enough unless you have thousands of files) | |
# - inactive=7d is the time that items will remain cached without being accessed (7 days), after which they will be removed | |
# - use_temp_path=off tells NGINX to write files directly to the cache directory and avoid unnecessary copying of data to a temporary storage area first | |
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=STATIC:10m inactive=7d use_temp_path=off; | |
upstream nextjs_upstream { |