Skip to content

Instantly share code, notes, and snippets.

@ukstudio
ukstudio / スタバ初心者の手引き.txt
Created July 29, 2011 07:14
スタバ初心者の手引き
基本。ここ見ておけばラテぐらいは頼める。
というかスタバで最初につまづくのはどうやらサイズっぽいので
サイズだけ確認しておけば多分どうにでもある。
ビバレッジっていうのはつまり飲料ってことだ。
http://www.starbucks.co.jp/howto/store/order.html
カスタマイズとか通ぶりたい人はここを見る。
http://store.starbucks.co.jp/customize/item.html#childTab01
タンブラーとかで持ち帰りしてみたい人はここを見る。
@ukstudio
ukstudio / marker_spec_01.rb
Created June 27, 2011 03:06 — forked from yuya-takeyama/marker_spec_01.rb
RSpec の書き方, メソッド単位に describe で分割するパターンと, オブジェクトの状態単位に context で分割するパターンとあると思う.
# メソッド単位に describe で分割するパターン
require 'spec_helper'
module Codebreaker
describe Marker do
let(:secret) { '1234' }
describe '#exact_match_count' do
subject { Marker.new(secret, guess).exact_match_count }
require 'rspec'
class Dummy
attr_reader :arg
def initialize(arg)
@arg = arg
end
end
describe 'raise' do
class UserList < ActiveRecord::Base
# user_id ログインしてる人
# facebook_user_id userlist.yamlのIDと同じ
# name userlist.yamlのnameと同じ
# enable userlist.yamlのenableと同じ
end
class MyUserList
def initialize(id)
@id = id
require 'socket'
class RubyIrcClient
def initialize(server = 'irc.freenode.net', port = 6667)
@server = server
@port = port
@socket= TCPSocket.new(@server, @port)
end
def login
nick('ukstudio_test').
require 'coffee-script'
mongoose = require 'mongoose'
mongoose.connect 'mongodb://localhost/node'
Schema = mongoose.Schema
# schema定義
UserSchema = new Schema
name : String
http = require 'http'
http.createServer( (req, res) ->
res.writeHead 200, {'Content-Type': 'text/plain; charset=utf-8'}
res.end 'みてるー?\n'
).listen(8124, "127.0.0.1")
@ukstudio
ukstudio / gist:963569
Created May 9, 2011 22:34
server.js for node.js
var http = require('http')
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain; charset=utf-8'});
res.end('みてるー?\n');
}).listen(8124, "127.0.0.1");
# coding: utf-8
class Fixnum
def ほむ
self.times { puts 'ほむ' }
end
end
10.ほむ
@ukstudio
ukstudio / hello.coffee
Created April 18, 2011 17:28
CoffeeScript+QUnit
hello = -> 'hello'