Hello Gopher

Download and install

Download Golang and install it.

Create your workspace

$ mkdir goprojects
$ export GOPATH=$HOME/goprojects
$ cd goprojects
$ mkdir -p src/github.com/jazminschroeder
$ cd src/github.com/jazminschroeder

Creating a project

$ mkdir hello_gopher
$ cd hello_gopher
$ vim hello_gopher.go
 
 # Hello gopher 
 package main
 import "fmt"

 func main() {
  fmt.Println("Hello gopher!!!")
 }

Go install

$ go install

Say hello gopher!

$ ~/goprojects/bin/hello
$ Hello gopher!!!

Mysql Query From Binary to Uuid

From binary to uuid

SELECT
  LOWER(
    CONCAT(
      LEFT(HEX(binary_field), 8),
      '-',
      MID(HEX(binary_field), 9, 4),
      '-',
      MID(HEX(binary_field), 13, 4),
      '-',
      MID(HEX(binary_field), 17, 4),
      '-',
      RIGHT(HEX(binary_field), 12)
    )
  ) AS uuid
FROM some_table

Dyld: Library Not Loaded: /usr/local/lib/libevent-2.0.5.dylib

Problems with tmux?

$ tmux
dyld: Library not loaded: /usr/local/lib/libevent-2.0.5.dylib

# Install libevent
$ brew install libevent
Warning: libevent-2.0.21 already installed

# Already intalled. Where is it?
$brew link libevent
Warning: Already linked: /usr/local/Cellar/libevent/2.0.21
To relink: brew unlink libevent && brew link libevent

# Relink it
$brew unlink libevent && brew link libevent

RabbitMQ From the Command Line

rabbitmqctl

List queues messages and consumers

$ sudo rabbitmqctl list_queues name messages consumers

Listing queues ...
test.two.queue  0       0
test.one.queue     0       0

List exchanges

$ sudo rabbitmqctl list_exchanges

Syncing a Fork

#Set a new remote for the orinal repository
$ git remote add upstream git@github.com:jazminschroeder/repo.git

#fetch upstream's branches
$ git fetch upstream

#merge upstream
$ git merge upstream/master

Cucumber Scenario Outlines

Scenario Outline: Table example
 Given I have an "<option>"
 Then I should see "<result>"

 Examples:
   | option   | result   |
   | option 1 | result 1 |
   | option 2 | result 2 |