Skip to content

Instantly share code, notes, and snippets.

View tmtk75's full-sized avatar

Tomotaka Sakuma tmtk75

View GitHub Profile
#!/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";
package main
import "fmt"
type Human struct {
Age int
Name string
Walk func(place string)
}
" Basic settings
set number
set nowrap
" Syntax highlighting
syntax enable
set nohlsearch
"set cursorline
" font thickness to be normal
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
type HttpResponse http.Response
package main
type A struct {
Name string
}
type B struct {
A
}
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"]
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 provides a way to see exit status
//
package main
import (
"fmt"
"os/exec"
"syscall"
)
variable "aws_access_key" {}
variable "aws_secret_key" {}
variable "key_name" {}
variable "aws_region" {}
variable "cidr" {
default = "192.168.11.0/24"
}
provider "aws" {
access_key = "${var.aws_access_key}"
#!/bin/bash
#
# consul Manage the consul agent
#
# chkconfig: 2345 95 95
# description: Consul is a tool for service discovery and configuration
# processname: consul
# config: /etc/consul.conf
# pidfile: /var/run/consul.pid