Skip to content

Instantly share code, notes, and snippets.

View yoichiro-manabe's full-sized avatar
🌿
ケムリクサいいですね

Yoichiro Manabe yoichiro-manabe

🌿
ケムリクサいいですね
  • beaglesoft LLC
  • Japan
View GitHub Profile
@yoichiro-manabe
yoichiro-manabe / gist:11344687
Created April 27, 2014 12:44
ActiveRecordの共通処理をmoduleで行う
# ==
# モデルのベースクラス
# モデルに共通の処理はこのクラスに定義する。
module ApplicationBase
extend ActiveSupport::Concern
included do
acts_as_paranoid
application_base_common
end
be spring rake db:drop;be spring rake db:create;be spring rake db:migrate; be spring rake db:seed;
@yoichiro-manabe
yoichiro-manabe / .irbrc
Created July 23, 2016 11:09
RubyMineのRailsConsoleで必要な設定
include FactoryGirl::Syntax::Methods
# ActiveRecordのログ内容を表示する
ActiveRecord::Base.logger = Logger.new(STDOUT)
# ログの内容を表示する
Rails.logger = Logger.new(STDOUT)
# ActiveRecordの取得結果をテーブル形式で表示する
Hirb.enable
@yoichiro-manabe
yoichiro-manabe / tslint.config
Last active July 25, 2016 13:32
use-strictを導入したtslint.config
{
"rules": {
"class-name": true,
"use-strict": [
true,
"check-module",
"check-function"
],
"comment-format": [
true,
@yoichiro-manabe
yoichiro-manabe / dein.toml
Created August 11, 2016 00:47
vimのプラグイン管理
# 基本は github.com のレポジトリーを指定するだけ
[[plugins]]
repo = 'Shougo/dein.vim'
[[plugins]]
repo = 'Shougo/vimproc.vim'
[[plugins]]
repo = 'delphinus35/typescript-vim'
rev = 'colorize-template-strings'
@yoichiro-manabe
yoichiro-manabe / gist:d3cf036f0e215d5b202ed67bc6dee90e
Created August 11, 2016 12:30
Mac Vimのインラインインプットメソッドの変換処理について
https://github.com/splhack/macvim-kaoriya/issues/26
# ローカルの変更を破棄する
git checkout file_name
# 追加したファイルをstageから削除する
git revert file_name
# ファイルをバージョン管理から外す
git rm --cached file_name
北海道 01
青森県 02
岩手県 03
宮城県 04
秋田県 05
山形県 06
福島県 07
茨城県 08
栃木県 09
群馬県 10
const prefCodes = {
"北海道": "01",
"青森県": "02",
"岩手県": "03",
"宮城県": "04",
"秋田県": "05",
"山形県": "06",
"福島県": "07",
"茨城県": "08",
"栃木県": "09",
@yoichiro-manabe
yoichiro-manabe / leaflet_numbered_markers.css
Created October 25, 2018 11:31 — forked from comp615/leaflet_numbered_markers.css
Numbered Markers in Leaflet (JS Mapping)
.leaflet-div-icon {
background: transparent;
border: none;
}
.leaflet-marker-icon .number{
position: relative;
top: -37px;
font-size: 12px;
width: 25px;