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
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" |
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
Table of Contents generated with DocToc
| cd fonts | |
| mv *.ttf /usr/share/fonts/truetype | |
| cd /usr/share/fonts/truetype | |
| mkfontscale | |
| mkfontdir | |
| fc-cache | |
| xset fp rehash |
| NOTE: This document is OLD - and most of the tips here are probably outdated, since newer versions of Javascript have been | |
| released over the years - with newer optimizations and more emphasis on optimizing newly supported syntax. | |
| // Array literal (= []) is faster than Array constructor (new Array()) | |
| // http://jsperf.com/new-array-vs-literal/15 | |
| var array = []; | |
| // Object literal (={}) is faster than Object constructor (new Object()) | |
| // http://jsperf.com/new-array-vs-literal/26 |
| docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |
| import ( | |
| "crypto/md5" | |
| "encoding/hex" | |
| ) | |
| func GetMD5Hash(text string) string { | |
| hasher := md5.New() | |
| hasher.Write([]byte(text)) | |
| return hex.EncodeToString(hasher.Sum(nil)) | |
| } |
| sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3000 | |
| sudo iptables-save |
| /** | |
| * Module dependencies | |
| */ | |
| var express = require('express'); | |
| var fs = require('fs'); | |
| var mongoose = require('mongoose'); | |
| var Schema = mongoose.Schema; | |
| // img path |
| <?php | |
| /** | |
| * Convert a comma separated file into an associated array. | |
| * The first row should contain the array keys. | |
| * | |
| * Example: | |
| * | |
| * @param string $filename Path to the CSV file | |
| * @param string $delimiter The separator used in the file | |
| * @return array |