Skip to content

Instantly share code, notes, and snippets.

View hanachin's full-sized avatar
🌺
OKA

Seiei Miyagi hanachin

🌺
OKA
View GitHub Profile
@hanachin
hanachin / data.yml
Last active December 14, 2015 03:08 — forked from kimihito/data.yml
Lisa_Rose:
Lady_in_the_Water: 2.5
Snakes_on_a_Plane : 3.5
Just_My_Luck: 3.0
Superman_Returns: 3.5
You_Me_and_Dupree: 2.5
The_Night_Litener: 3.0
Gene_Seymour:
Lady_in_the_Water: 3.0
#!/bin/sh
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
@hanachin
hanachin / ask_hand_service.rb
Last active December 19, 2015 11:39 — forked from webcrafts/gist:5948862
janken game. $ ruby main.rb
require './hand.rb'
class AskHandService
CHOICE_NUMBER_START = 1
def initialize
@hands = Hand.rock_paper_scissors
end
def choices
class SocketServerClass
_sioListenPort = 8080
constructor : (@app, @nodeModules, @appOption) ->
@sio = @nodeModules.sio
@http = @nodeModules.http
@appServer = @http.createServer(@app)
# session --------------------
@mongoose = require 'mongoose'
class PatternConverter
def initialize(pattern, &convert)
@pattern = pattern
@convert = convert
end
def ===(s)
@pattern === s
end
puts 'gist gem'
@hanachin
hanachin / post_actions_controller.rb
Last active March 18, 2016 15:15 — forked from sinsoku/action.rb
action resource
# app/controllers/post_actions_controller.rb
class PostActionsController < ApplicationController
# POST /posts/:id/publish.json
def publish
if current_post.update(state: :publish, published_at: Time.zone.now)
else
end
end
require 'with_refinements'
module Ext
refine Integer do
def asdjflk
"ujihisa #{self}"
end
end
end