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
name: | |
markdown | |
Format: | |
%title%\n%url% | |
filter: | |
const matches = s.match( /^(.+)\n([^\n]+)$/ );let title = matches[ 1 ];let url = matches[ 2 ];if ( url.match(/^https:\/\/www\.amazon\.co\.jp.*\/(dp|gp|ASIN|product)/) ){const dp_matches = url.match( /\/(dp|gp|ASIN|product)\/([0-9A-Z]{10})([^0-9A-Z])/ );const dp = "dp/" + dp_matches[ 2 ] + "/";url = "https://www.amazon.co.jp/" + dp;title = title.replace( / \| .*$/, "");title = title.replace( /[A-Za-z0-9]/g, c => String.fromCharCode(c.charCodeAt(0) - 0xFEE0) );title = title.replace( / /g, " ");}return "[" + title + "](" + url + ")"; |
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
{ | |
"configurations": [ | |
{ | |
"name": "Win32", | |
"defines": [ | |
"_DEBUG", | |
"UNICODE", | |
"_UNICODE" | |
], | |
"windowsSdkVersion": "10.0.18362.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
return ((s)=>{const d = new Date();const yyyy = d.getFullYear();const mm = ("0"+(d.getMonth()+1)).slice(-2);const dd = ("0"+d.getDate()).slice(-2);const date = `${yyyy}-${mm}-${dd}`;const hh = ("0"+d.getHours()).slice(-2);const mi = ("0"+d.getMinutes()).slice(-2);const sc = ("0"+d.getSeconds()).slice(-2);const time = `${hh}:${mi}:${sc}`;s = s.replace( /\$%date%\$/, date );s = s.replace( /\$%time%\$/, time );return s;})(s); | |
/* | |
return ( | |
(s)=>{ | |
const d = new Date(); | |
const yyyy = d.getFullYear(); | |
const mm = ("0"+(d.getMonth()+1)).slice(-2); | |
const dd = ("0"+d.getDate()).slice(-2); | |
const date = `${yyyy}-${mm}-${dd}`; |
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
# gz 圧縮ファイル展開しながら読み込み | |
require 'zlib' | |
filename_gz = "mysql-bin.000004.sql.gz" | |
lineno = 0 | |
Zlib::GzipReader.open( filename_gz ) do |gz| | |
gz.each do |line| | |
lineno += 1 | |
if /reg/i === line |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
#----------------------------------------------------------------------------- | |
# | |
# | |
# | |
# 2015-09-16 | |
#----------------------------------------------------------------------------- | |
require 'pp' | |
require 'fileutils' |