Skip to content

Instantly share code, notes, and snippets.

View yuuki's full-sized avatar

Yuuki TSUBOUCHI yuuki

View GitHub Profile
package main
import (
"code.google.com/p/go-tour/tree"
"fmt"
)
// Walk walks the tree t sending all values
// from the tree to the channel ch.
func Walk(t *tree.Tree, ch chan int) {
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'optparse'
require 'json'
require 'mackerel/client'
# Mackerel API Spec
## http://help-ja.mackerel.io/entry/spec/api/v0
@yuuki
yuuki / ologin.rb
Created June 11, 2011 17:21
Osaka-u Wireless LAN Login with CLI
#! /usr/bin/env ruby
# -*- coding:utf-8 -*-
require "logger"
require "mechanize"
$url = "https://login.odins.osaka-u.ac.jp/login.gsp"
$uid = "your uid"
$passwd = "your passwd"
@yuuki
yuuki / .vimrc
Created June 11, 2011 17:28
My .vimrc
" set file encoding type "
set encoding=utf-8
set fileencodings=utf-8,iso-2022-jp,sjis,euc-jp
set fileformats=unix,mac
set number
set tabstop=4
set showtabline=2
set ignorecase
@yuuki
yuuki / xmlprinter.rb
Created June 11, 2011 17:30
print arranged Xml
#! /usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'optparse'
Version = "0.1.0"
$arg_options = Hash.new
$arg_options[:t] = false
$opts = OptionParser.new {|opt|
begin
@yuuki
yuuki / .emacs.el
Created June 12, 2011 02:12
emacs setting
;;; set Language Japanese
(set-language-environment 'Japanese)
;;; use utf-8
(prefer-coding-system 'utf-8)
;;; set Locale environment setting
(set-locale-environment nil)
;;; Key-Bind
@yuuki
yuuki / test.rb
Created May 12, 2012 04:08
てすと
puts "Hello World"
@yuuki
yuuki / euler1.py
Created May 17, 2012 04:03
プロジェクトオイラー
#!/usr/bin/env python
# -*- coding: utf-8 -*-
print(sum([i for i in range(1, 1000) if (i % 3 == 0) or (i % 5 == 0) ], 0))
@yuuki
yuuki / div2-144-200.cpp
Created May 23, 2012 15:22
SRM Div2-144 200score
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <string>
#include <iostream>
using namespace std;
class Time {
@yuuki
yuuki / div2-145-200.cpp
Created May 24, 2012 21:29
SRM Div2-145 200score
// {{{ Boilerplate Code <--------------------------------------------------
//
// vim:filetype=cpp foldmethod=marker foldmarker={{{,}}}
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>