A Go version of The Perl Cookbook
The Perl part is copyrighted by O'Reilly & Associates yet freely available.
This copy is based on http://pleac.sourceforge.net/pleac_perl.data
// turnAmp controls the mPower Mini unit in Barloga, which | |
// powers the rainbow Google Chord AMP hooked up to the speakers. | |
func turnAmp(on bool) bool { | |
c, err := ssh.Dial("tcp", "10.0.0.nnnn:22", &ssh.ClientConfig{ | |
HostKeyCallback: ssh.InsecureIgnoreHostKey(), | |
Config: ssh.Config{ | |
Ciphers: []string{"aes128-cbc"}, | |
}, | |
User: "ubnt", | |
Auth: []ssh.AuthMethod{ssh.Password("xxxxx")}, |
A Go version of The Perl Cookbook
The Perl part is copyrighted by O'Reilly & Associates yet freely available.
This copy is based on http://pleac.sourceforge.net/pleac_perl.data
extension_id=jifpbeccnghkjeaalbbjmodiffmgedin # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc"
unzip -d "$extension_id-source" "$extension_id.zip"
Thx to crxviewer for the magic download URL.
/* | |
hamcrest implements very basic hamcrest style asserts | |
for example: | |
func TestStuff(t *testing.T) { | |
Assert(t).That(2 * 4, Equals(6)) | |
} | |
*/ | |
package hamcrest | |
import "fmt" |
#!/bin/bash | |
VIM_DIR=~/.vim/ | |
BUNDLE_DIR=$VIM_DIR/bundle | |
sanity_check() { | |
test -d $1 || { echo "Error: " $BUNDLE_DIR "directory does not exist."; exit 1; } | |
command -v git >/dev/null 2>&1 || { echo "Error: cannot find git executable"; exit 1; } | |
command -v parallel >/dev/null 2>&1 || { echo "Error: cannot find parallel executable"; exit 1; } | |
} |
There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.
So, these are the different settings we are going to compare:
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
#!/usr/bin/env ruby | |
# Teststack: A way to preload your Rails app stack for your iterative test running | |
# Based on ideas from Jesse Storimer here: | |
# http://www.jstorimer.com/blogs/workingwithcode/8136295-screencast-faster-rails-test-runs-with-unix | |
# https://gist.github.com/jstorimer/5862436 | |
# Usage: Run this file without args to run the server; run it with test file args to connect to the server and run tests | |
require 'socket' |