Skip to content

Instantly share code, notes, and snippets.

View nati's full-sized avatar

Nachi Ueno nati

View GitHub Profile
import pygame
import sys
import time
import random
error = pygame.init()
if error[1] > 0:
print error
sys.exit(-1)
---
swagger: "2.0"
info:
version: "0.1"
title: "gohan API"
basePath: "/"
schemes:
- "http"
consumes:
- "application/json"
#!/bin/bash
# waitup
#
# A utility function for show notification when a server get ssh ready
#
# install:
# brew installterminal-notifier
#
# usage:
root@vagrant:/opt/contrail# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"
root@vagrant:/opt/contrail# scons test
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
BuildInfoAction(["build/debug/config/common/buildinfo.py"], [])
nueno-mbp:contrail-go-api[list_mock]$ go get -u github.com/golang/lint/golint
nueno-mbp:contrail-go-api[list_mock]$ golint
client.go:36:6: exported type Authenticator should have comment or be unexported
client.go:40:6: exported type NopAuthenticator should have comment or be unexported
client.go:43:1: exported method NopAuthenticator.AddAuthentication should have comment or be unexported
client.go:48:6: type ApiClient should be APIClient
client.go:58:32: don't use underscores in Go names; interface method parameter parent_id should be parentID
client.go:60:38: don't use underscores in Go names; interface method parameter parent_id should be parentID
client.go:63:1: comment on exported type Client should be of the form "Client ..." (with optional leading article)
client.go:71:1: comment on exported type ListResult should be of the form "ListResult ..." (with optional leading article)
ZSchema.registerFormat("yaml", function (str) {
return true;
});
ZSchema.registerFormat("javascript", function (str) {
return true;
});
ZSchema.registerFormat("jsonschema", function (str) {
return true;
});
ZSchema.registerFormat("uuid", function (str) {
#!/bin/bash
set -x
brctl addbr br1
ip link set dev br1 up
function makeenv {
local id=$1
local ip=$2
(1) merge master for dev branch
* commit 22d31273b5296fee636b94e18b073837d22361a9
|\ Merge: 5737ec5 b0e81b5
| | Author:
| | Date: Mon Jul 13 21:14:42 2015 +0900
| |
| | Merge branch 'master' into development
| |
@nati
nati / cube.py
Last active August 29, 2015 14:07
import math
import time
import sys
HEIGHT = 50
WIDTH = 200
SCALE = 7
X = 0
<source>
type exec
command sh /etc/td-agent/stats.sh
format tsv
keys hostname,nginx,memcached
tag stats
run_interval 5
</source>
<match stats>