Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
(new Intl.NumberFormat('ja-JP', { | |
style: 'currency', | |
currency: 'JPY' | |
})).format( | |
Array.from(document.querySelectorAll('span.a-price-whole').values()) | |
.map(function(v) { return v.innerText }) | |
.map(function(v) { return parseInt(v.split(',').join('')) }) | |
.reduce(function(ret, v) { return ret + v }) | |
) |
# | |
# 変数の宣言 | |
# | |
variable "vpc_id" { | |
type = "string" | |
default = "vpc-0a84e4b7d165f8525" | |
} | |
variable "vpc_subnet_id" { | |
type = "string" |
# frozen_string_literal: true | |
# Ref: <https://en.wikipedia.org/wiki/Kiyoshi_Hikawa> | |
# Ref: <https://twitter.com/kumiromilk/status/707437861881180160> | |
# See also: <https://qiita.com/shunsugai@github/items/971a15461de29563bf90> | |
# 「ズン」「ドコ」のいずれかをランダムで出力し続けて | |
# 「ズン」「ズン」「ズン」「ズン」「ドコ」の配列が出たら | |
# 「キ・ヨ・シ!」って出力して終了 | |
class Zundoko | |
WORD_PAIR = %w[ズン ドコ] |
#!/bin/sh | |
# About rerun: [alexch/rerun: Restarts an app when the filesystem changes. Uses growl and FSEventStream if on OS X.](https://github.com/alexch/rerun/) | |
# About yard: [YARD - A Ruby Documentation Tool](https://yardoc.org/) | |
# Note: specify `-d [directory where not same directory level of .yard]` option to avoid endless loop | |
rerun -d app -c "rm -rf .yard && yard doc && ./yard_server.sh restart" |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# Ref: * [Railsで今月のカレンダーを生成するerbコード - Qiita](https://qiita.com/nnabeyang/items/8b54a28551983d9cdb32) | |
# put into... app/helpers/calendar_table_helper.rb | |
# <table/> タグを用いてカレンダーを生成する | |
module CalendarTableHelper | |
def calendar_table_tag(today = Date.today) | |
tag.table do | |
calendar_caption(today) + | |
calendar_header + | |
calendar_body(today) | |
end |
「/login」に移動する
「username」フィールドに「admin」と入力する
#!/home/gouf/.anyenv/envs/rbenv/shims/ruby | |
# vim: ft=ruby | |
Dir.chdir(Dir.pwd) | |
# | |
# リポジトリ/ユーザ名の抽出 | |
# | |
origin = %x(git remote -v) |
バージョンごとに新規作成するコマンドがあったらベンリかもしれないと思った
# 2体のポケモンを戦わせる | |
class PokemonBattle | |
def initialize(pokemon_a, pokemon_b) | |
@turn_count = 0 | |
@players = [pokemon_a, pokemon_b] | |
end | |
def game_start! | |
print_initial_situation | |
loop do |