Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# For more info see https://golang.org/doc/install.html, the instructions there are all
# that is needed to install Go.
#
# DO NOT RUN with SUDO; Go should be installed under the user not root. Using sudo will
# cause problems. This script will install Go to /usr/local/go and create your workspace
# in your home directory: $HOME/go.
#
# The workspace is where all of the Go code will exist. Place your code in a subdirectory
# of $HOME/go/src. If you want your Go code (workspace) in a different location, change
@mohae
mohae / gist:a291b2d8a9065df02dcc
Created January 31, 2016 23:45
simple see if element exists examples in Go
package main
import (
"fmt"
"sort"
)
func main() {
// value for which to search
word := "b"
@mohae
mohae / installGo152
Last active December 30, 2015 05:25
Install Go 1.5.2 with $HOME/go as the workspace. Install is consistent with https://golang.org/doc/install
#!/bin/bash
# For more info see https://golang.org/doc/install.html, the instructions there are all
# that is needed to install Go.
#
# DO NOT RUN with SUDO; Go should be installed under the user not root. Using sudo will
# cause problems. This script will install Go to /usr/local/go and create your workspace
# in your home directory: $HOME/go.
#
# The workspace is where all of the Go code will exist. Place your code in a subdirectory
# of $HOME/go/src. If you want your Go code (workspace) in a different location, change
package main
import (
"fmt"
"github.com/segmentio/go-loggly"
"net/http"
)
const logglyToken = "insert-your-loggly-customer-token-here"
@mohae
mohae / gist:fab125cbcd25fa9e5807
Created October 25, 2015 04:14
ligature yaml config
package main
import (
"fmt"
"gopkg.in/yaml.v2"
)
var cfgYaml = []byte(`
params:
@mohae
mohae / Install_Go_1.4.2_for_bootstrap
Created September 15, 2015 14:34
Installs Go 1.4.2 to expected GOROOT_BOOTSTRAP location so Go version >= 1.5 can be compiled from source
#!/bin/bash
# DO NOT RUN with SUDO; Go should be installed under the user not root. Using sudo will
# cause problems.
#
# Since Go 1.4 or higher is required to compile Go 1.5 or higher from source; this
# installs Go 1.4.2 to $HOME/go1.4; the expected location of an existing Go tool chain.
# If you install it to a different location, set the GOROOT_BOOSTRAP environment
# variable accordingly.
#
# For more information: https://golang.org/doc/install/source
@mohae
mohae / go_install_1.4.2
Created September 12, 2015 05:26
Install Go 1.4.2 per install instructions; v1.4 or higher is needed to compile Go 1.5 or higher
#!/bin/bash
# For more info see https://golang.org/doc/install.html, the instructions there are all
# that is needed to install Go.
#
# DO NOT RUN with SUDO; Go should be installed under the user not root. Using sudo will
# cause problems. This script will install Go to /usr/local/go and create your workspace
# in your home directory: $HOME/go.
#
# The workspace is where all of the Go code will exist. Place your code in a subdirectory
# of $HOME/go/src. If you want your Go code (workspace) in a different location, change
@mohae
mohae / go_install_1.5.1
Last active September 12, 2015 05:27
Install Go 1.5.1 with $HOME/go as the workspace. Install is consistent with https://golang.org/doc/install
#!/bin/bash
# For more info see https://golang.org/doc/install.html, the instructions there are all
# that is needed to install Go.
#
# DO NOT RUN with SUDO; Go should be installed under the user not root. Using sudo will
# cause problems. This script will install Go to /usr/local/go and create your workspace
# in your home directory: $HOME/go.
#
# The workspace is where all of the Go code will exist. Place your code in a subdirectory
# of $HOME/go/src. If you want your Go code (workspace) in a different location, change
@mohae
mohae / go_install_1_5
Last active September 12, 2015 05:28
Install Go 1.5 with $HOME/go as the workspace. Install is consistent with https://golang.org/doc/install
#!/bin/bash
# For more info see https://golang.org/doc/install.html, the instructions there are all
# that is needed to install Go.
#
# DO NOT RUN with SUDO; Go should be installed under the user not root. Using sudo will
# cause problems. This script will install Go to /usr/local/go and create your workspace
# in your home directory: $HOME/go.
#
# The workspace is where all of the Go code will exist. Place your code in a subdirectory
# of $HOME/go/src. If you want your Go code (workspace) in a different location, change
local:
Data failed to compile:
----------
Rendering SLS 'base:redis' failed: Unknown yaml render error; line 26
download-redis:
archive:
- extracted
- name: {{ root }}/redis-{{ version }}.tar.gz
- source: http://download.redis.io/releases/redis-{{ version }}.tar.gz