Skip to content

Instantly share code, notes, and snippets.

View miio's full-sized avatar

miio mitani miio

  • Sapporo, Hokkaido, Japan
View GitHub Profile
@miio
miio / legay_bbs.php
Created June 7, 2011 07:41
Legacy Simple BBS
<?php
error_reporting(-1);
ini_set('display_errors','On');
/**
* TDDBC Lv3 or Lv4 LegacyCode
* Legacy Simple BBS
* info@miio.info
*/
/**
@miio
miio / gist:1036195
Created June 20, 2011 18:16
Night H-Na-Hiro
import java.util.ArrayList;
import java.util.List;
public class hnahiro {
public static void main(String[] args) {
// TODO Auto-generated method stub
class HHiro{
protected String name="エッチ・ナ・ヒロ";
@Override
public String toString(){
@miio
miio / gist:1036227
Created June 20, 2011 18:30
NightPeoples
public class NightPeoples {
public static void main(String[] args) {
// TODO Auto-generated method stub
class HHiro{
protected String name="エッチ・ナ・ヒロ";
@Override
public String toString(){
return name;
}
}
@miio
miio / LICENCE
Created August 6, 2011 16:08
9leapで作ったものに+フレームワークぽいものを作り中
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
@miio
miio / chusen.py
Created August 18, 2011 16:12
抽選プログラム
#!/usr/bin/python
#coding: UTF-8
import csv
import random
filename = "entry.csv"
csvfile = open(filename)
list = []
@miio
miio / gist:1432568
Created December 5, 2011 06:35
gitoriosインストール途中の経過諸々
#まずClone
git clone git://gitorious.org/gitorious/mainline.git
bundle install
Fetching https://github.com/roman/rots.git
remote: Counting objects: 253, done.
remote: Compressing objects: 100% (116/116), done.
remote: Total 253 (delta 126), reused 233 (delta 118)
Receiving objects: 100% (253/253), 38.58 KiB, done.
@miio
miio / example.php
Created December 31, 2011 17:11
PHPでクラスとインタフェース 型指定の関係
<?php
interface ExampleInterface{
function getHoge();
function getFuga();
function setAge(int $age);
}
class Example implements ExampleInterface{
function getHoge(){
}
#show hidden file
defaults write com.apple.finder AppleShowAllFiles -boolean true
killall Finder
#install homebrew ( for mac package system )
ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
@miio
miio / gist:2012358
Created March 10, 2012 18:16
ロガークラスのメモ
class Logger
###
# Loggingクラス
# Author : miio mitani <info@miio.info>
# Package : Kwing.lib
# Licence : GNU Lesser General Public License v3 (http://www.gnu.org/licenses/)
###
debug : (attr_name, message) ->
###
# デバッグメッセージを出力
@miio
miio / hoges_controller.rb
Created March 22, 2012 16:18
RailsPermission Snips
class HogeController < ApplicationController
before_filter :only => [:destroy] { |c| c.has_perm(current_user, 'hoge.hoge_delete') }
before_filter :only => [:create] { |c| c.has_perm(current_user, 'hoge.hoge_create') }
def create
# todo your logics
end