Skip to content

Instantly share code, notes, and snippets.

View fukayatsu's full-sized avatar
🏠
Working from home

Atsuo Fukaya fukayatsu

🏠
Working from home
View GitHub Profile
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@Gab-km
Gab-km / github-flow.ja.md
Last active December 28, 2025 18:24 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@moro
moro / unit_test_spec.rb
Created September 19, 2012 02:31
unit_test_spec.rb
class A
def foo(num)
%w[one two three][num - 1]
end
end
describe A do
describe "#foo" do
RSpec::Matchers.define :do_foo do |args|
match do |instance|
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@ritou
ritou / cookiesync.md
Last active April 14, 2023 12:45
Cookie Syncについてのメモ

Cookie Syncの調査メモ

RTB周りで使われているというCookie Syncについて興味がわいたので調べてみる。

http://www.scaleout.jp/26992/

DMP-DSP間

Quoraから。

@taea
taea / balloon_mixin.sass
Last active October 12, 2016 06:58
balloon mixin : 1行でふきだしの三角部分が書けるmixin
/* balloon
=balloon-left($size: 6px, $color: #FFF, $top: 6px)
position: relative
&:after
position: absolute
content: ""
display: block
border: $size solid transparent
border-right: $size solid $color
top: $top
Application.configure do
config.after_initialize do
# Partialの情報をHTMLに埋める
# For ActionPack 3.2.8
class ActionView::PartialRenderer
def render_with_partial_annotation(*args)
setup(*args)
path = @path
content = "".html_safe
@yasuoza
yasuoza / TDD_advent_calender_2012_22.md
Created December 22, 2012 09:11
TDDを取り入れたい誰かのために

このエントリはTDD Advent Calendar jp: 2012の22日目のエントリです。 昨日は@fukayatsuさんのTDDを続けるためにでした。

世界終わらなくてよかったですね!Hello world!

というわけで今日はTDDをチームや社内で導入するために僕がやったことや、失敗したことなどを共有できたらいいなと思い、エントリを書きます。

まず、すでに社内全体でTDDを導入できている人はこのエントリを読む必要はありません。僕に伝えられることは何もありません。ここで読み終わってOKです。

つぎに、社内やチーム内の重要ポストの人がTDDやテスト自動化なんて意味なし、無駄なことだと思っている場合は、TDDがすでに定着している会社に転職をするといいと思います。僕に伝えられることは何もありません。ここで読み終わってOKです。

@takashi
takashi / sublime-keymap
Created January 16, 2013 12:42
sublime-keybinding
[
// how to move in the filer with hjkl
{ "keys": ["j"], "command": "move", "args": {"by": "lines", "forward": true}, "context":
[ {"key": "control", "operand": "sidebar_tree"} ]
},
{ "keys": ["k"], "command": "move", "args": {"by": "lines", "forward": false}, "context":
[ {"key": "control", "operand": "sidebar_tree"} ]
},
{ "keys": ["l"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[ {"key": "control", "operand": "sidebar_tree"} ]
@tkawa
tkawa / i18n_exception_handler.rb
Created February 3, 2013 12:36
Railsでlocaleの翻訳が見つからなかったとき、“translation missing”はログに出して、viewにはhumanizeした文字列を出す
# config/initializers/i18n_exception_handler.rb
I18n.exception_handler = ->(exception, locale, key, options) do
if exception.is_a?(I18n::MissingTranslation)
Rails.logger.warn exception.message if Rails.env.development?
key.to_s.split('.').last.humanize
else
raise exception
end
end