Skip to content

Instantly share code, notes, and snippets.

View lcaballero's full-sized avatar

Lucas Caballero lcaballero

View GitHub Profile
http://www.getautoma.com/
http://www.sikuli.org/
http://www.sikulix.com/
http://stackoverflow.com/questions/11497613/what-better-tool-than-sikuli-to-use-for-screen-automation-on-windows-7-or-prefe
# Using govendor fetch and sync -- needs go-imports meta tag
https://groups.google.com/forum/#!topic/golang-nuts/AURCoVLjNyc
https://github.com/kardianos/govendor
https://github.com/golang/go/blob/0104a31b8fbcbe52728a08867b26415d282c35d2/src/cmd/go/discovery.go#L38
@lcaballero
lcaballero / network-tools.org
Created May 12, 2016 17:21
Helpful network issue debugging.

netstat

@lcaballero
lcaballero / tims-question.go
Last active June 5, 2016 08:25
Tim's Question
package main
import (
"fmt"
"net/http"
"io/ioutil"
"time"
)
type QueryResponse struct {
Installing Go
- Install Go
- Make these dirs:
- ~/Projects/Go
- ~/Projects/Go/{src,bin,pkg,src}
- Export in .bashrc these variables
- export GOPATH=~/Projects/Go
- export PATH=$GOPATH/bin:$GOPATH
@lcaballero
lcaballero / report.sh
Last active November 8, 2016 18:38
Bash script to run various report card go lang.
#!/bin/bash
GOROOT=/opt/go1.6
source "colors.sh"
function go_install() {
go install
if [ "$?" != "0" ]; then
echo "repository doesn't compile."
@lcaballero
lcaballero / colors.sh
Created November 8, 2016 18:37
Simplistic way to add color to shell scripts in console output.
#!/usr/bin/env bash
red=31 ; green=32 ; brown=33 ; blue=34
purple=35 ; cyan=36 ; light_gray=37
function _a() {
echo -e -n "\033[$1m${@:2}\033[0m "
}
function _rd() {
_a $red $*
@lcaballero
lcaballero / story-craft.org
Last active November 30, 2016 16:03
Writing Fundamentals: The Craft of Story

Writing Fundamentals: The Craft of Story

A Story Is:

  • How what happens
  • Affects someone
  • In pursuit of a difficult goal
  • How he or she changes
@lcaballero
lcaballero / pre-commit.sh
Created February 10, 2017 18:35
A simple pre-commit hook to run go tests (with race flag)
#!/bin/bash
git stash -q --keep-index
go test --race ./...
RESULT=$?
git stash pop -q
if [ $RESULT -ne 0 ] ; then
echo "pre-commit tests failed."
exit 1
package main
import (
"fmt"
"net/http"
"os"
)
func main() {
dir := "."
@lcaballero
lcaballero / broken-pipe-session.txt
Last active July 20, 2017 16:08
Broken pipe exit session
Supported escape sequences:
~. - terminate session
~B - send a BREAK to the remote system
~R - Request rekey (SSH protocol 2 only)
~# - list forwarded connections
~? - this message
~~ - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)
Reference: