Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

oinume oinume

🏠
Working from home
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am oinume on github.
  • I am oinume (https://keybase.io/oinume) on keybase.
  • I have a public key ASAbPtN4USOtjo2JaIwHRQK1s1URLiDsQsA6-M8DMjs0rAo

To claim this, I am signing this object:

@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',