Skip to content

Instantly share code, notes, and snippets.

View lcaballero's full-sized avatar

Lucas Caballero lcaballero

View GitHub Profile
@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 / 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 / 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."
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 / 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 {
@lcaballero
lcaballero / network-tools.org
Created May 12, 2016 17:21
Helpful network issue debugging.

netstat

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 / nginx.min.tpl.conf
Created April 10, 2016 10:51
Template for a minimal nginx.conf
## Fill in the areas with the [custom] label.
#user nobody;
worker_processes 1;
error_log [custom]/error.log;
events {
worker_connections 1024;
}
@lcaballero
lcaballero / shortcut-summary.txt
Created March 5, 2016 22:58
List of iterm2 remapping -- just so I remember
alt-, => cmd-, do not remapped modifier
al-1 => Unicode char ¡ so that in emacs I can bind cmd-1 to neotree-toggle
c-shift-b => M-f forward-word
c-shift-f => M-b backward-word
alt-b => C-b forward-char
alt-i => M-i other-window -1
alt-o => M-o other-window +1
alt-k => M-k kill-buffer
alt-tab => cmd-tab do not remap modifier
;;; go-template-mode.el --- Major mode for Go template language
;;; Commentary:
;; 1) Copy this file somewhere in your Emacs `load-path'. To see what
;; your `load-path' is, run inside emacs: C-h v load-path<RET>
;;
;; 2) Add the following to your .emacs file:
;;
;; (require 'go-template-mode)