This file contains 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
// bait | |
var imgLinks=document.querySelectorAll(".product-image-gallery img.gallery-image"); | |
imgLinks.forEach((img_tag,index)=>{ | |
const url=img_tag.src; | |
console.log(url); | |
const parent=document.querySelector(".product-name"); | |
const link=document.createElement("a"); | |
link.href=url; | |
link.target="_blank"; |
This file contains 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
var imgLinks=document.querySelectorAll("picture img.img-fluid"); | |
imgLinks.forEach((img_tag,index)=>{ | |
const url=img_tag.src; | |
const parent=document.querySelector(".col-12.title.product-title"); | |
const link=document.createElement("a"); | |
console.log(img_tag.src.replace(/\?.$/i,"?wid=1200&hei=1200")); | |
link.href=url.replace(/\?.*$/i,"?wid=1200&hei=1200"); | |
link.target="_blank"; | |
link.download=true; | |
link.innerHTML="Download"+(index+1); |
This file contains 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
var imgLinks = document.querySelectorAll(".slick-dots.slick-thumb img"); | |
imgLinks.forEach((img_tag, index) => { | |
const url = img_tag.src; | |
const parent = document.querySelector("div.ProductDetails-header"); | |
const link = document.createElement("a"); | |
console.log(img_tag.src.replace(/\?.*$/i, "?wid=1200&hei=1200")); | |
link.href = url.replace(/\?.*$/i, "?wid=1200&hei=1200"); | |
link.target = "_blank"; | |
link.download = true; | |
link.innerHTML = "Download " + (index + 1); |
This file contains 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
list = { | |
brand: {selector: "#s_brand dd > a"}, | |
title: {selector: "h1"}, | |
category: {selector: "#s_cate a"}, | |
season: {selector: "#s_season a"}, | |
price: {selector: "#abtest_display_pc"}, | |
info: {selector: ".info_box_wrap span"}, | |
freetext: {selector: "p.free_txt"}, | |
} | |
res = {} |
This file contains 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 'mail' | |
require 'nkf' | |
Dir.glob("*.eml").each do |eml| | |
m = Mail.new(File.read(eml)) | |
File.open("#{eml}.txt", "w") do |f| | |
f << m.subject | |
f << "\n" * 3 | |
if m.multipart? | |
m.parts.each do |part| | |
f << NKF.nkf("-w -Lu -d", part.decoded) |
This file contains 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
!flag && NF > 1 && $1 != "平均値:" && FNR > 1{ | |
# 項目の最初の行。 | |
sub("/", "-", $2) | |
# ファイル名に使えるように/を取り除く | |
flag = $2 | |
} | |
$1 == "平均値:" { | |
#項目の最後ということなので、フラグをクリア | |
flag=0; |
This file contains 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 "net/http" | |
require "uri" | |
require "aws-sdk" | |
target_domain=ARGV[0] | |
zone_name=target_domain.split(".")[-2, 2].join(".") + "." | |
# Get global IP address | |
uri = URI.parse("https://ifconfig.co/ip") |
This file contains 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
function createTohoEventFromGmail(){ | |
var calendar = CalendarApp.getDefaultCalendar(); | |
var start = 0; | |
var max = 5; | |
var event_length = 100; // minutes | |
var threads = GmailApp.search('from:i-net.ticket@ml.tohotheater.jp',start,max); | |
for(var i in threads){ | |
var thread = threads[i]; | |
var msgs = thread.getMessages(); |
This file contains 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/local/bin/ruby | |
require 'twitter' | |
target = {"2000" => "2千位", | |
"10000" => "1万位", | |
"20000" => "2万位", | |
"50000" => "5万位", | |
"100000" => "10万位" | |
} | |
if ARGV[0] == "config" |
NewerOlder