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; } | |
| } |
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' |
| #!/usr/sbin/dtrace -s | |
| /* Run like: | |
| % sudo csh | |
| # ./spy.d $PROCESS_ID [$INTERESTING_PROBEPROV] | |
| Prints a line of dashes every 5 seconds to delineate different experiments. | |
| */ | |
| #pragma D option quiet |