Skip to content

Instantly share code, notes, and snippets.

View 2get's full-sized avatar
😌
Think

Mayoto Yoshida 2get

😌
Think
  • GMO Pepabo, Inc.
  • Tokyo, Japan
View GitHub Profile
@2get
2get / array_quest_spec.rb
Created July 24, 2012 03:19
Array methods quiz
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
# $ rspec array_quest_spec.rb
class ArrayQuest
def q1(array)
array.first
end
@2get
2get / config.ru
Created October 3, 2012 04:17
Hello World. Using Rack
require 'rubygems'
require 'rack'
class App
def call(env)
[ 200, { 'Content-Type' => 'text/plain' }, ['Hello World.'] ]
end
end
run App.new
@2get
2get / Gemfile
Created October 3, 2012 04:26
Hello World. Using Sinatra
source :rubygems
gem 'sinatra'
@2get
2get / windows_store_application_privacy_policy.md
Created October 16, 2012 11:50
Windows Store Application Privacy Policy

プライバシーポリシー

Windows ストアアプリのプライバシーポリシー

  • アプリを利用される方のプライバシーを尊重し、本アプリは、個人情報を収集いたしません。
  • アプリ内で閲覧、検索、共有した情報について、追跡や収集、外部への転送はいたしません。
@2get
2get / ordered_dict.py
Created December 5, 2012 08:34
Python OrderedDict
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import OrderedDict
print '### Standard Dict ###'
d = {}
for i in range(1, 11):
@2get
2get / create_consecutive_image.py
Last active December 16, 2015 02:18
create consecutive image連番画像生成スクリプトPILを使用します。
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# pip install pillow
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
WIDTH = 480
@2get
2get / enchant.simple_label_controller.js
Last active December 16, 2015 02:29
enchant.js で簡単なコントローラを作ってみた。(enchant.js触って1時間スマホで動かすよう)
var up = new Label(80, 40);
up.text = 'up';
up.x = 140;
up.y = 240;
up.addEventListener('touchstart', function() {
game.input.up = true;
});
up.addEventListener('touchend', function() {
game.input.up = false;
});

Pull Request を出す前に最新の master の内容を作業ブランチに取り込む

merge ではなく rebase を使う

作業ブランチで git rebase master

CONFLICT が起きたら

修正して git add [file] した後 git rebase --continue

@2get
2get / pp_json.rb
Created June 25, 2013 03:05
pretty-print JSON
def pp_json(json)
puts `echo '#{json}' | python -mjson.tool`
end
@2get
2get / checkout-remote-branch.md
Last active December 19, 2015 16:08
リモートブランチをローカルに持ってくる
git fetch
git checkout -t origin/remote-branch-name