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
import requests | |
from bs4 import BeautifulSoup | |
import json | |
import datetime | |
from itertools import groupby | |
def get_soup(url): | |
html = requests.get(url) | |
soup = BeautifulSoup(html.content, "html.parser") | |
return soup |
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
javascript: (function () { | |
const title = document.title; | |
const textArea = document.createElement("textarea"); | |
textArea.setAttribute("id", "copyTarget"); | |
textArea.value = title; | |
document.body.appendChild(textArea); | |
const copyText = document.querySelector("#copyTarget"); | |
copyText.select(); | |
document.execCommand("copy"); |
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 'active_support/time' | |
require 'active_support/core_ext' | |
output_txt = "" | |
start_of_month = Time.now.beginning_of_month.to_date.strftime("%Y-%m-%d") | |
end_of_month = Time.now.end_of_month.to_date.strftime("%Y-%m-%d") | |
date_range = (start_of_month..end_of_month) | |
date_range.each do |d| |
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
// use bookmarklet | |
javascript: (function() { | |
document.querySelector('[aria-label="Timeline: Trending now"]').style.display = "none"; | |
document.querySelector('[aria-label="Who to follow"]').style.display = "none"; | |
})(); |
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
javascript: (function () { | |
document.querySelectorAll(".comment-body").forEach((comment) => { | |
comment.addEventListener("click", (e) => { | |
const editLink = e.target | |
.closest(".edit-comment-hide") | |
.parentElement.querySelectorAll(".timeline-comment-action")[1]; | |
editLink.click(); | |
setTimeout(() => { | |
editLink.parentElement.querySelector(".js-comment-edit-button").click(); | |
}, 1000); |
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(){ | |
//この記事を書いた人の実装 | |
$('.ts-fab-latest-posts-link').click(function(){ | |
$('#ts-fab-bio-above').removeClass('show').addClass('hide'); | |
$('.profiletab').removeClass('active'); | |
$('#ts-fab-latest-posts-above').removeClass('hide').addClass('show'); | |
$(this).addClass('active'); | |
}); | |
$('.profiletab').click(function(){ | |
$('#ts-fab-bio-above').removeClass('hide').addClass('show'); |
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
/* この記事を書いた人ボックス */ | |
.ts-fab-wrapper{ | |
width: 80%; | |
margin-left:10%; | |
} | |
/* 表示・非表示用に使用 */ | |
.show { | |
display: block; | |
} |
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
<div id="ts-fab-above" class="ts-fab-wrapper"> | |
<ul class="ts-fab-list"> | |
<li class="ts-fab-list profiletab active"><a>この記事を書いた人</a></li> | |
<li class="ts-fab-latest-posts-link"><a>最新の記事</a></li> | |
</ul> | |
<div class="ts-fab-tabs"> | |
<div id="ts-fab-bio-above" class="ts-fab-tab show"> | |
<div class="ts-fab-avatar"><img class="avatar-kenzo avatar avatar-80 wp-user-avator wp-user-avatar-80 alignnone photo" style="display: block;" src="http://kenzooooo.com/wp-content/uploads/2018/10/top.jpg" alt="けんぞう" data-lazy-loaded="true" /> | |
</div> | |
<div class="ts-fab-text"> |
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(){ | |
$(window).scroll(function(){ | |
var windowHeight =$(window).height(); | |
var windowTop =$(window).scrollTop(); | |
$(".underline1").each(function(){ | |
var objectImage =$(this).offset().top; | |
if(windowTop > objectImage - windowHeight*1/2){$(this).css("background-size","100% 100%")}; | |
}); | |
$(".underline2").each(function(){ | |
var objectImage =$(this).offset().top; |
NewerOlder