Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sachin21's full-sized avatar
💭
Feel free to email to me.

Satoshi Ohmori sachin21

💭
Feel free to email to me.
View GitHub Profile
# In your test_helper.rb
class ActiveRecord::Base
mattr_accessor :shared_connection
@@shared_connection = nil
def self.connection
@@shared_connection || retrieve_connection
end
end
@aurels
aurels / gist:843967
Created February 25, 2011 15:45
stream system command output to STDOUT (ruby)
IO.popen('ant run') do |io|
while (line = io.gets) do
puts line
end
end
@hail2u
hail2u / csslint-rules.md
Last active April 29, 2023 14:59
CSSLintのRulesの超訳

訳注

これは超訳です。

CSSLintは「なんでこんなルールなんだ…」とイラっとすることが多いですけど、それぞれにそれなりに理由があります。まぁ勿論無視するべきなルールとかもあります。例えば見出し要素の再定義禁止とかはHTML5に対するCSSなら無理な話です。そんなわけでどんな理由なのかを簡単に訳しました。無視するかどうかは自分で決めましょう!

この訳はCSSLintと同じライセンスで提供されます。

Possible Errors

@miya0001
miya0001 / wordpress.dict
Created November 12, 2011 13:27
wordpress .dict file for automatic word completion in vim
absint
activate_plugin
activate_plugins
activate_sitewide_plugin
add_action
add_blog_option
add_clean_index
add_comment_meta
add_comments_page
add_contextual_help
@caseyohara
caseyohara / reserved_usernames.rb
Created December 9, 2011 22:58
A list of reserved usernames to avoid vanity URL collision with resource paths
# A list of possible usernames to reserve to avoid
# vanity URL collision with resource paths
# It is a merged list of the recommendations from this Quora discussion:
# http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features
# Country TLDs found here:
# http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
# Languages found here:
@Gab-km
Gab-km / github-flow.ja.md
Last active April 14, 2024 08:08 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)

GitHub Flow

31 Aug 2011

git-flowの問題点 (Issues with git-flow)

私は人々にGitを教えるためにあちこちを飛び回っているが、最近のほぼすべてのクラスやワークショップで git-flow についてどう思うかを尋ねられた。私はいつも、git-flowは素晴らしいと思うと答えている。何百万ものワークフローを持ったシステム(Git)を提供し、ドキュメントもあるし、よくテストされている。フレキシブルなワークフローは、実に容易なやり方で多くの開発者の役に立つ。標準的なものになりつつあり、開発者はプロジェクトや企業の間を移動しつつこの標準的なワークフローに馴染むことができる。

module RSpec
module Core
class Example
def run_with_retry(example_group_instance, reporter)
@retrying_count = 0
succeeded = run_without_retry(example_group_instance, reporter)
unless succeeded
return finish_without_retry(reporter) unless retry_needed?
@kjlubick
kjlubick / LICENSE
Last active May 1, 2022 22:26
Exports a THREE.js scene mesh to STL, making it suitable for 3d printing
The MIT License
Copyright © 2010-2016 three.js authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@cucmberium
cucmberium / gist:e687e88565b6a9ca7039
Last active February 28, 2024 01:23
Twitterの検索API & Twitterでの検索術

twitterの検索術 (search/tweetssearch/universal)

search/tweets では一週間以上前のツイートは検索できないので注意

search/universal は公式のConsumerKey/ConsumerSecretでないと使用できない

当方では一切の責任を負いません

@joker1007
joker1007 / ginzarb_21.md
Last active April 14, 2021 06:41
Ginza.rb 21回の発表資料。rails_adminのつらみとオススメgem達。

rails_adminのつらみとオススメGemについて

rails_adminのつらみ

カスタマイズできるようで出来ない

レコード件数が一定以上になると使えない機能

  • ダッシュボード
  • 何も考えずに各モデルをカウントするのでレコード件数増えるとえらいことになる。