start new:
tmux
start new with session name:
tmux new -s myname
window.getLangStats = function getLangStats(repos) { | |
var mapper = function(ent){return ent.language}, | |
reducer = function(stats, lang) {stats[lang] = (stats[lang] || 0) + 1; return stats}, | |
langStats = repos.map(mapper).reduce(reducer, {}); | |
delete langStats['null']; | |
return Object.keys(langStats).sort(function(a,b){return langStats[b] - langStats[a]}); | |
}; | |
window.ghApiCallHandler = function(result) { | |
if (Math.floor(result.meta.status/100) == 2) |
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
package main | |
import ( | |
"log" | |
"bufio" | |
"time" | |
"os" | |
"fmt" | |
"io" | |
"net" |
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"golang.org/x/net/webdav" |
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
// Source: https://stackoverflow.com/questions/12321133/golang-random-number-generator-how-to-seed-properly | |
package main | |
import ( | |
"crypto/sha1" | |
"fmt" | |
"math/rand" | |
"time" | |
) |