呼び出し元。set -exののち、スタートメッセージを表示 -> 引数で渡されたシェルスクリプトをsource -> エンドメッセージ表示
呼び出される子供。
| #require 'open-uri' | |
| max_id = 999999999999999999 | |
| twitter_name = 'XXXXXXXXXXXXXXXX' | |
| 2.times do | |
| tl = Twitter.user_timeline(twitter_name, count: 200, max_id: max_id, include_rts: false) | |
| media_tl = tl.select{|tweet| !(tweet.media.empty?)} | |
| media_tl.each {|tweet| `open #{tweet.media.first.url}`} | |
| max_id = current.last.id |
| module Fluent | |
| class TextParser | |
| class MyJSONParser | |
| include Configurable | |
| config_param :time_key, :string, :default => 'time' | |
| config_param :time_format, :string, :default => nil | |
| def call(text) |
| require 'twilio-ruby' | |
| #twilio account | |
| twilio_account_sid = 'XXXXXX' | |
| auth_token = 'XXXXXX' | |
| from_number = '+81XXXXX' #コール元(twilioの電話番号) | |
| to_number = '+81XXXXX' #コール先 | |
| url = 'http://example.com' #通話を接続する時に使う完全修飾 URL です。 着信通話を処理するために、電話番号に URL をセットするのと同じです。 詳細は、後述の URL パラメーター のセクションを参照してください。 https://jp.twilio.com/docs/api/rest/making-calls |
| # -*- coding: utf-8 -*- | |
| require 'mechanize' | |
| require 'webrat' | |
| require 'pry' | |
| Webrat.configure do |config| | |
| config.mode = :mechanize | |
| end |
| #!/bin/bash | |
| if [ $# -ne 2 ]; then | |
| echo "引数1にpadrinoプロジェクト名を入れて下さい" 1>&2 | |
| echo "引数2にpadrinoコアアプリケーション名を入れて下さい" 1>&2 | |
| exit 1 | |
| fi | |
| cat << EOS > Gemfile | |
| source "http://rubygems.org" |
| #!/bin/bash | |
| if [ $# -ne 1 ]; then | |
| echo "引数1にrailsアプリ名を入れて下さい" 1>&2 | |
| exit 1 | |
| fi | |
| cat << EOS > Gemfile | |
| source "http://rubygems.org" | |
| gem "rails", "3.2" |
| # -*- coding: utf-8 | |
| require 'pry' | |
| class Fixnum | |
| def numerals | |
| if self < 20 | |
| case self | |
| when 0 | |
| 'zero' | |
| when 1 |
| namespace :rails_best_practices do | |
| desc "run rails best practices" | |
| task :jenkins_plot_plugin => :environment do | |
| cd Padrino.root do | |
| OUTDIR = "#{Padrino.root}/reports" | |
| mkdir OUTDIR unless FileTest.exist? OUTDIR | |
| OUTFILE = "#{OUTDIR}/rails_best_practices.properties" |
| namespace :rails_best_practices do | |
| desc "run rails best practices" | |
| task :jenkins_plot_plugin => :environment do | |
| cd Rails.root do | |
| OUTDIR = "#{Rails.root}/reports" | |
| mkdir OUTDIR unless FileTest.exist? OUTDIR | |
| OUTFILE = "#{OUTDIR}/rails_best_practices.properties" |