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
{ | |
"member_id": "JM0693349", | |
"user_id": "30588", | |
"password": "ここにパスワードを入力する" | |
} |
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
/* | |
* Kindle 版「まんがで読破」シリーズの 11 円セールで、すべての書籍を読み込んだのち 11 円の書籍だけを表示する。 | |
* 「1-Click で今すぐ買う」ボタンをクリックしても画面遷移せずに、購入後の画面が別タブで開くようにするおまけつき。 | |
* https://www.amazon.co.jp/gp/product/B07K2K2RSN?ref_=dbs_r_series&storeType=ebooks | |
*/ | |
const removeAllExcept11yen = () => { | |
Array.from(document.querySelectorAll('.a-color-price')).filter(el => el.innerText !== '¥11').forEach(el => el.closest('.series-childAsin-item').remove()); | |
}; | |
const makeSubmitButtonsOpenNewTab = () => { | |
Array.from(document.querySelectorAll('.series-childAsin-item form')).forEach(el => el.setAttribute('target', '_blank')); |
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
HANDS = { | |
0 => 'グー', | |
1 => 'チョキ', | |
2 => 'パー' | |
}.freeze | |
DRAW = 0 | |
LOSE = 1 | |
WIN = 2 |
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
[1] pry(main)> (1..10).map { |n| puts(n); n }.map { |n| puts(n); n } | |
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 |
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
"ほげ\nほげ\rほげ\r\n".gsub(/(?<!\r)\n|\r(?!\n)/, "\r\n") |
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 'csv' | |
require 'forwardable' | |
class CSVRows | |
extend Forwardable | |
attr_reader :csv_path | |
def_delegators :each, *Enumerable.instance_methods(false) | |
def initialize(csv_path) |
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
inherit_from: .rubocop_todo.yml | |
AllCops: | |
Exclude: | |
- 'vendor/**/*' | |
- 'node_modules/**/*' | |
- 'bin/**/*' | |
- 'config/**/*' | |
- 'db/**/*' | |
- 'frontend/node_modules/**/*' |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9i2niah9/bCHxXxi9E1ipCAlSqTfyVvKlV01qQ5lRL8JqJIVTF5tue2yY6FnX0LptxQ92Zw17FIXn2KBTOZSd0fxi33+SMu4IGCpTBsaEX4d7Pukic/8oSagKX5Kyrj79lsEM9HJPR9PDSlaM8QHbY9b16PhAqdDlvfrvSGScgSGTJkiSLfkbCP85JhoWyKPh2+XW1RJ3MjrTxhqk9Zuake+4cpqvfxlSmoNiUASa3uj6QcpUc4dogoS5qXaswkJANL9X5mOS6lFVd+Eu7d448BLwuU9Q1Ya1nQBPaeCnHBa8rBGEo3gvUAxxHT1QG7AyvEOmNJM2kvUcEDeb4CU1 [email protected] |
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
from datetime import datetime | |
from OpenSSL import crypto | |
from pytz import timezone | |
import ssl | |
class CetificateDatetime: | |
WEEKDAYS = ('月', '火', '水', '木', '金', '土', '日') | |
def __init__(self, dt): |
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
import contextlib | |
@contextlib.contextmanager | |
def overwriting(): | |
import sys | |
original_write = sys.stdout.write | |
def overwrite(text): | |
original_write('\033[K') # カーソル位置から行末までを消す。 |