This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ -> | |
| do init = (context = document)-> | |
| $('select.grouped', context).each -> | |
| $select = $ @ | |
| $hidden = $select.clone().hide().attr(name: '', class: '') | |
| $options = $select.find 'option' | |
| group_title = $select.data 'group-title' | |
| group_by = $select.data 'group-by' | |
| group_label = $select.data 'group-label' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ -> | |
| $('select.jump').each -> | |
| $select = $ @ | |
| # 初期選択状態 | |
| if current = $select.data 'current' | |
| $select.val(current).trigger($.Event('select', current: current)) | |
| # changeしたら遷移 | |
| $select.on 'change', (ev)-> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git branch --merged master --list "feature/*" | xargs git branch -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 略... | |
| # formatter | |
| require "airbrussh/capistrano" | |
| require_relative 'lib/capistrano/airbrussh.rb' | |
| # Load custom tasks from `lib/capistrano/tasks` if you have any defined | |
| Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # initializers/active_job.rb | |
| module ActiveJob | |
| module CountableRetry | |
| extend ActiveSupport::Concern | |
| included do | |
| class << self | |
| alias_method_chain :deserialize, :retry_config | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var defer1 = new $.Deferred(), | |
| defer2 = new $.Deferred(); | |
| // ready | |
| $(function(){ | |
| defer1.resolve(); | |
| }); | |
| // load | |
| window.onload = function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # USAGE: | |
| # rails g migration add_deleted_at_to_hoge_model deleted_at:datetime | |
| # | |
| # class HogeModel | |
| # extend Extensions::SoftDeletable | |
| # soft_deletable | |
| # end | |
| # | |
| # | |
| # hoge.destroy_softly # or hoge.destroy_softly! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # config/initializers/slim.rb | |
| # SEE: http://sunaku.github.io/slim-tilt-redcarpet.html | |
| require 'slim' | |
| require 'tilt' | |
| require 'redcarpet' | |
| renderer_class = Redcarpet::Render::HTML | |
| render_options = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 2回目以降も可能に | |
| def run_task_reenable(task, *args) | |
| @tasks ||= {} | |
| unless @tasks[task] == args | |
| Rake::Task[task].invoke *args | |
| Rake::Task[task].reenable # Allow the task to be run again | |
| end | |
| @tasks[task] = args |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>pathfinder dice</title> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css"> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> | |
| <style type="text/css"> | |
| .cols{ |