- 嘉悦大学ソーシャル図書館
- d-labo ミッドタウン
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
| ruby_version=2.1.2 | |
| git --git-dir=$HOME/.rbenv/plugins/ruby-build/.git pull | |
| rbenv install $ruby_version | |
| rbenv shell $ruby_version | |
| gem install bundler |
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
| require 'hall' | |
| namespace :hall_notify do | |
| task :environment do | |
| set :capistrano_thumb_url, | |
| 'https://raw.github.com/smashingboxes/capistrano-haller/master/resources/capistrano-logo.png' | |
| end | |
| def send_hall_notification(action) | |
| hall_room_key = fetch(:hall_room_key) |
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
| Vagrant.configure(2) do |config| | |
| config.vm.provision :chef_solo do |chef| | |
| chef.cookbooks_path = %w(site-cookbooks cookbooks) | |
| chef.add_recipe 'postgresql' | |
| chef.json = { | |
| postgresql: { | |
| version: '9.3', | |
| enable_pgdg_yum: true, | |
| client: { packages: %w(postgresql93-devel) }, |
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
| <input type="text" pattern="(201[26]|202[048])/0?2/(0?[1-9]|[12]\d)|(201[^26]|202[^048])/0?2/(0?[1-9]|1\d|2[0-8])|20[12]\d/(0?[469]|11)/(0?[1-9]|[12]\d|30)|20[12]\d/(0?[13578]|1[02])/(0?[1-9]|[12]\d|3[01])"/> |
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
| window.fluid.dockBadge = ''; | |
| setTimeout(updateDockBadge, 1000); | |
| setTimeout(updateDockBadge, 3000); | |
| setInterval(updateDockBadge, 5000); | |
| $('.promotionArea').css('display', 'none'); | |
| function updateDockBadge() { | |
| var newBadge = ''; | |
| var totalCount = 0; |
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
| def phone_valid?(value) | |
| # value should have only digits and hyphens. | |
| return false unless value =~ /^0\d[\d\-]+\d$/ | |
| # value should have 10 or 11 size digits. | |
| return false unless [10,11].include?(value.gsub(/\-/, '').length) | |
| true | |
| 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
| #!/bin/sh | |
| pfx='rel' | |
| d=`date +%Y%m%d%H%M%S` | |
| git flow release start $pfx-$d | |
| git flow release finish -m"Release:$d" $pfx-$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
| # hash = { a: { b: 1 } } | |
| # path hash, :a, :b -> 1 | |
| def path(source, *keys) | |
| return nil unless source | |
| return nil unless source.respond_to? :[] | |
| keys.each do |key| | |
| return nil unless source.respond_to? :[] | |
| source = source[key] |