更新 | 2019-03-10 |
バージョン | 0.1.4 |
一言 | いえい |
- 発音記号重要そう
### Usage | |
# download or copy this file to your unix computer | |
# open terminal | |
# $ cd <path to the directory which has randostrings.rb> | |
# $ ruby randstrings.rb | |
require 'securerandom' | |
length = 16 | |
4.times do | |
puts "a random string which is #{length} chars length" |
admin/articles/1/editのページにて<li><a onClick={this._onMenuContentClick(1)}>見出し</a></li>
(article_menu.jsx)をクリックをするたびに
ContentsEditor.state.contentsに要素を追加しそれを更新・出力する。
<li><a onClick={this._onMenuContentClick(1)}>見出し</a></li>
で指定している_onMenuContentClick(1)
がまだクリックされていないのにページ読み込み時に実行される
↓
ContentsEditor.onMenuClick(content)
が無限回呼び出される
↓
以下のエラーを吐く
require 'uri' | |
require 'net/http' | |
require 'optparse' | |
################## | |
# READHERE | |
################## | |
# 使い方: | |
# % ruby url_testing_tools_sample.rb --api=<YOUR API KEY> --url=<URL> | |
# Google API Manager(https://console.developers.google.com)で |
require 'nokogiri' | |
require 'open-uri' | |
URL = 'https://www.youtube.com' | |
PLAYLIST_URL = URL + '<Playlist Path>' | |
puts = 'Scraping..' | |
doc = Nokogiri::HTML(open(PLAYLIST_URL)) | |
videos_xpath = '//*[@id="pl-load-more-destination"]/tr' |
# lyrics.rb | |
# Usage: ruby lyrics.rb maroon5 maps | |
require 'json' | |
require 'open-uri' | |
artist = ARGV[0] | |
title = ARGV[1] | |
api_url = 'http://lyric-api.herokuapp.com/api/find/%s/%s' | |
source_url = URI.escape(api_url % [artist, title]) |