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
// | |
// This provides a way to see exit status | |
// | |
package main | |
import ( | |
"fmt" | |
"os/exec" | |
"syscall" | |
) |
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
function test_05_turnUser_disable(params, context, done) { | |
$.ajax({ | |
type: 'PUT', | |
url: params['baseURL'] + '/apps/' + context.getAppID() | |
+ '/users/' + params['userID'] + '/status', | |
headers: { | |
'x-kii-appid': context.getAppID(), | |
'x-kii-appkey':context.getAppKey(), | |
'authorization': 'bearer ' + params['token'] |
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
FROM centos | |
RUN yum install -y http://ftp.riken.jp/Linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm | |
RUN yum install -y golang | |
RUN yum install -y git | |
ENV GOPATH /.go | |
RUN go get -u github.com/armon/consul-kv | |
RUN go get -u github.com/hashicorp/envconsul | |
WORKDIR /.go/src/github.com/hashicorp/envconsul | |
RUN go build | |
CMD ["cp", "envconsul", "/target"] |
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 | |
type A struct { | |
Name string | |
} | |
type B struct { | |
A | |
} |
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/ioutil" | |
"net/http" | |
) | |
type HttpResponse http.Response |
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
" Basic settings | |
set number | |
set nowrap | |
" Syntax highlighting | |
syntax enable | |
set nohlsearch | |
"set cursorline | |
" font thickness to be normal |
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" | |
type Human struct { | |
Age int | |
Name string | |
Walk func(place string) | |
} |
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
#!/usr/bin/env node | |
require("node-jquery-xhr"); | |
kii = require("./KiiSDK.js").create(); | |
var appid = "xxxxxxxx", | |
appkey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; | |
kii.Kii.initializeWithSite(appid, appkey, kii.KiiSite.US); | |
var username = "qyArFPHZu1", | |
password = "TcRlGqkzsX"; |
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
PATH=$PATH:/Program\ Files/Inkscape | |
size=${1:-960} | |
\ls *.svg | head -n1 | while read n; do | |
inkscape.exe "$n" \ | |
--export-width=$size \ | |
--export-height=$size \ | |
--export-png="${n%.svg}_${size}px.png" | |
done |
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
aws ec2 describe-instances --filter "Name=group-id,Values=sg-d1235xxx" "Name=instance-state-name,Values=running" | jq ".[]|length" |