This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Objective: demonstrate that there are more use cases | |
// for union types than previously thought. | |
// http://groups.google.com/group/golang-nuts/browse_thread/thread/fbde059a7cfd2fa9 | |
// | |
// Interface inference. | |
// We already have type inference, so this would be very Go-like: | |
type typeA int | |
func (x typeA) A() {} | |
func (x typeB) C() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ go tool dist list | |
android/386 | |
android/amd64 | |
android/arm | |
android/arm64 | |
darwin/386 | |
darwin/amd64 | |
darwin/arm | |
darwin/arm64 | |
dragonfly/amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" | |
"code.google.com/p/go.crypto/ssh" | |
"code.google.com/p/go.crypto/ssh/terminal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@keyframes colorhue{ | |
from {-webkit-filter: hue-rotate(0deg); filter: hue-rotate(0deg);} | |
to {-webkit-filter: hue-rotate(359deg); filter: hue-rotate(359deg);} | |
} | |
.edit { | |
animation: colorhue 1s linear infinite; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running: /root/.yourbase/tools/miniconda3/miniconda-4.7.10/bin/conda update -q conda in /workspace | |
Collecting package metadata (current_repodata.json): ...working... done | |
Solving environment: ...working... done | |
## Package Plan ## | |
environment location: /root/.yourbase/tools/miniconda3/miniconda-4.7.10 | |
added / updated specs: | |
- conda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies: | |
build: | |
- python:3.6.3 | |
- heroku:latest | |
- homebrew:latest | |
runtime: | |
- python:3.6.3 | |
- heroku:latest | |
- homebrew:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[dependencies] | |
build = [ | |
"python:3.6.3", | |
"heroku:latest", | |
"homebrew:latest" | |
] | |
runtime = [ | |
"python:3.6.3", | |
"heroku:latest", | |
"homebrew:latest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
hetzner "github.com/appscode/go-hetzner" | |
) | |
// Problem: this library and perhaps the underlying API don't seem to provide access to the server bidding stuff. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function clone() { | |
repo=$1 # https://github.com/fatih/vim-go.git | |
dest=$2 # ~/.vim/pack/plugins/start/vim-go | |
mkdir -p $dest | |
cd $dest | |
git init | |
if ! git config remote.origin.url &> /dev/null;then | |
git remote add origin $repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Expects Ubuntu 16.06 (xenial) and kernel 4.x. | |
# Based upon a blog post by Zach at http://zachzimm.com/blog/?p=191 | |
set -eux | |
# Have the user call sudo early so the credentials is valid later on | |
sudo whoami |
NewerOlder