... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
#!/usr/bin/python | |
# encoding: utf-8 | |
# | |
# Copyright (c) 2013 <[email protected]>. | |
# | |
# MIT Licence. See http://opensource.org/licenses/MIT | |
# | |
# Created on 2013-11-01 | |
# |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
language: node_js | |
node_js: ["0.11", "0.10"] | |
env: | |
CODECLIMATE_REPO_TOKEN: <your_token> | |
before_script: | |
- npm install -g istanbul | |
- npm install -g mocha | |
- npm install -g codeclimate-test-reporter |
(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.
# Redis Debug Config to match on normal and warning Redis log lines. | |
input { | |
stdin { codec => "plain" } | |
} | |
filter { | |
grok { | |
# Extends the normal redis pattern to account for warnings as well. | |
match => [ "message", "\[%{POSINT:pid}\] %{REDISTIMESTAMP:timestamp} # %{LOGLEVEL:level} %{GREEDYDATA:mymessage}"] | |
match => [ "message", "\[%{POSINT:pid}\] %{REDISTIMESTAMP:timestamp} \* %{GREEDYDATA:mymessage}"] |
# Built application files | |
/*/build/ | |
# Crashlytics configuations | |
com_crashlytics_export_strings.xml | |
# Local configuration file (sdk path, etc) | |
local.properties | |
# Gradle generated files |
#!/bin/bash | |
# References | |
# http://www.computerhope.com/unix/nc.htm#03 | |
# https://github.com/daniloegea/netcat | |
# http://unix.stackexchange.com/questions/26715/how-can-i-communicate-with-a-unix-domain-socket-via-the-shell-on-debian-squeeze | |
# http://unix.stackexchange.com/questions/33924/write-inside-a-socket-open-by-another-process-in-linux/33982#33982 | |
# http://www.linuxjournal.com/content/more-using-bashs-built-devtcp-file-tcpip | |
# http://www.dest-unreach.org/socat/ | |
# http://stuff.mit.edu/afs/sipb/machine/penguin-lust/src/socat-1.7.1.2/EXAMPLES |
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"log" | |
"net/rpc" | |
) | |
func main() { |
This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.
ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Other options for PDFSETTINGS: