$ curl -fsSL https://raw.github.com/tcnksm/docker-alias/master/zshrc >> ~/.bashrc && source ~/.bashrc
# ------------------------------------
/* | |
Parallel processing with ordered output in Go | |
(you can use this pattern by importing https://github.com/MarianoGappa/parseq) | |
This example implementation is useful when the following 3 conditions are true: | |
1) the rate of input is higher than the rate of output on the system (i.e. it queues up) | |
2) the processing of input can be parallelised, and overall throughput increases by doing so | |
3) the order of output of the system needs to respect order of input | |
- if 1 is false, KISS! |
/* | |
This snippet is an example of backpressure implementation in Go. | |
It doesn't run in Go Playground, because it starts an HTTP Server. | |
The example starts an HTTP server and sends multiple requests to it. The server starts denying | |
requests by replying an "X" (i.e. a 502) when its buffered channel reaches capacity. | |
This is not the same as rate-limiting; you might be interested in https://github.com/juju/ratelimit | |
or https://godoc.org/golang.org/x/time/rate. |
This is not an exhaustive list of all interfaces in Go's standard library.
I only list those I think are important.
Interfaces defined in frequently used packages (like io
, fmt
) are included.
Interfaces that have significant importance are also included.
All of the following information is based on go version go1.8.3 darwin/amd64
.
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat
Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.
// imports a couple of java tasks | |
apply plugin: "java" | |
// List available tasks in the shell | |
> gradle tasks | |
// A Closure that configures the sourceSets Task | |
// Sets the main folder as Source folder (where the compiler is looking up the .java files) | |
sourceSets { | |
main.java.srcDir "src/main" |
#!/bin/bash | |
# +----------------------------------------------------------------------+ | |
# | | | |
# | Set up Mac OS X to store temporary files in RAM rather than on disk.| | |
# | Updated for Yosemite, 16 GB of RAM | | |
# | | | |
# | By James Newell <jrnewell@github> | | |
# | | | |
# | Originally by Ricardo Gameiro <http://blogs.nullvision.com/?p=357> | |
#!/bin/bash | |
# This script connects the computer to a vpn server using openconnect without pain | |
prog_name=$(basename $0) | |
# CHANGE YOUR_VPN_SERVER_DOMAIN to the VPN server you know like example.com | |
domain=YOUR_VPN_SERVER_DOMAIN | |
function help { |