Skip to content

Instantly share code, notes, and snippets.

View ursm's full-sized avatar

Keita Urashima ursm

View GitHub Profile
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit elisp-common eutils mercurial toolchain-funcs
DESCRIPTION="The Go Programming Language"
HOMEPAGE="http://golang.org/"
SRC_URI=""
/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {
$.event.special.textchange = {
gem 'rails3-generators'
gem 'mongoid', '>= 2.0.0.beta'
gem 'bson_ext'
gem 'haml'
gem 'hirb', :group => :development
gem 'what_methods', :group => :development
gem 'rspec-rails', '>= 2.0.0.beta', :group => :test
gem 'rr', :group => :test
require 'rubygems'
require 'rack'
run(lambda do
system 'killall X'
[200, { 'Content-Type' => 'text/plain' }, ['Goodbye!']]
end)
@sunaot
sunaot / gist:613106
Last active April 28, 2020 00:30
バグを生まないプログラミングのために

話しをしたいポイントは3つ。

  • 条件分岐を避けましょう
  • 一時変数の使い方に注意しましょう
  • 状態の使い方に気を使いましょう

これを徹底することで、バグの入り込む余地を最小限に保つプログラミングをしましょう。

条件分岐を避けましょう

@wjbuys
wjbuys / spec_helper.rb
Created November 4, 2010 20:41
Get the latest versions of RSpec2 and RR to play nice
require 'rspec'
require 'rr'
module RR
module Adapters
module Rspec
def self.included(mod)
RSpec.configuration.backtrace_clean_patterns.push(RR::Errors::BACKTRACE_IDENTIFIER)
end
end
@schacon
schacon / classy_git.md
Created November 12, 2010 20:48
RubyConf Talk
@seki
seki / otto.rb
Created December 11, 2010 13:01
require 'drb'
require 'pp'
require 'net/https'
require 'oauth'
require 'json'
class JSONStream
def initialize(drop)
@buf = ''
@drop = drop
@logankoester
logankoester / rails.vim
Created October 4, 2011 20:34
Useful Rails.vim macros
" Factories and Configuration
Rnavcommand config config -suffix=.yml -default=application
Rnavcommand factory spec/factories test/factories -suffix=.rb -default=model()
" Backbone
Rnavcommand bmodel app/assets/javascripts/backbone/models -suffix=.coffee -default=model()
Rnavcommand bview app/assets/javascripts/backbone/views -suffix=.coffee
" Apotomo Widgets (Cells)
Rnavcommand widget app/widgets -suffix=_widget.rb
@andykram
andykram / .vimrc
Created May 21, 2012 20:00
Using rails.vim to make backboning with the asset pipeline easier
" Shortcuts for backbone.js via the asset pipeline
autocmd User Rails Rnavcommand bbmodel app/assets/javascripts/backbone/models -suffix=.js.coffee -glob=*
autocmd User Rails Rnavcommand bbhelper app/assets/javascripts/backbone/helpers -suffix=.js.coffee -glob=*
autocmd User Rails Rnavcommand bbmixin app/assets/javascripts/backbone/mixins -suffix=.js.coffee -glob=*
autocmd User Rails Rnavcommand bbrouter app/assets/javascripts/backbone/routers -suffix=.js.coffee -glob=*
autocmd User Rails Rnavcommand bbtemplate app/assets/javascripts/backbone/templates -suffix=.jst.hbs -glob=**/*
autocmd User Rails Rnavcommand bbview app/assets/javascripts/backbone/views -suffix=.js.coffee -glob=**/*
" Shortcuts for less.js via the asset pipeline
autocmd User Rails Rnavcommand less app/assets/stylesheets/less -suffix=.less -glob=**/*