Skip to content

Instantly share code, notes, and snippets.

oinume oinume

Block or report user

Report or block oinume

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@oinume
oinume / visualization.ipynb
Created Jun 2, 2017
Visualization MySQL data in Jupyter Notebook
View visualization.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oinume
oinume / main.go
Last active Oct 13, 2016
agouti page.GetCookies() returns error
View main.go
package main
import (
"github.com/sclevine/agouti"
"net/http"
"net/http/httptest"
"fmt"
"time"
"log"
)
@oinume
oinume / main.go
Created Oct 9, 2015
http.RoundTripper
View main.go
package main
import (
"fmt"
"net/http"
)
type transport struct {
r http.RoundTripper
}
View template.json
{
"builders":[
{
"type":"virtualbox-ovf",
"source_path":"/Users/kazuhiro/.vagrant.d/boxes/oinume-VAGRANTSLASH-ubuntu-14.04-jp/1.0.1/virtualbox/box.ovf",
"ssh_username":"vagrant",
"ssh_password":"vagrant",
"ssh_wait_timeout":"30s",
"shutdown_command":"echo 'vagrant' | sudo -S shutdown -P now"
}
View dns_client.go
package main
import (
"fmt"
"os"
"github.com/miekg/dns"
"strings"
)
View xorm_custom_type.go
package main
import (
"errors"
"fmt"
"os"
_ "github.com/go-sql-driver/mysql"
"github.com/go-xorm/xorm"
_ "github.com/mattn/go-sqlite3"
View my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
View beaker_sample.py
# -*- coding: utf-8 -*-
# $ pip install beaker flask redis git+git://github.com/bbangert/beaker_extensions.git
from flask import Flask, session
from flask.sessions import SessionInterface
from beaker.middleware import SessionMiddleware
session_opts = {
'session.type': 'redis',
@oinume
oinume / hello.ts
Last active Aug 29, 2015
A simple express application with TypeScript.
View hello.ts
import express = require('express');
import http = require('http');
var app = express();
app.set('port', process.env.PORT || 3000);
app.get('/', function(req: express.Request, res: express.Response) {
res.send('Hello world!');
});
http.createServer(app).listen(app.get('port'), function() {
You can’t perform that action at this time.