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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// Choose either "stable" for receiving highly polished, | |
// or "canary" for less polished but more frequent updates | |
updateChannel: 'stable', |
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
# coding: UTF-8 | |
import urllib2 | |
# "pip install beautifulsoup4" needs to be done | |
from bs4 import BeautifulSoup | |
# const | |
baseUrl = "ここにブログURL" | |
url = baseUrl + "/archive" | |
linkClass = "hatena-star-permalink" | |
entryClass = "entry-content" |
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
The MIT License (MIT) | |
Copyright (c) [2015] [chuck] | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
// What is this: Util funciton which filters table data | |
// behavior: | |
// First apply multiple filters to each cells with AND_OR consideration | |
// Then AND_OR to columns as well | |
const { promisify } = require('util') | |
const request = promisify(require('request')) | |
// Can be dynamic state by Redux or something |
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
// node6.2.2で実行するため、es2015記法 | |
// パッケージimport | |
const fetch = require('node-fetch') | |
// get | |
fetch('https://github.com/') | |
.then((res) => res.text()) // プレーンテキスト | |
.then((body) => { | |
// githubのHTMLソースが表示される。 |
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
render 'ads/hoge-ad' |
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
/ ./app/views/ads/hoge_ad.slim | |
/ scriptのasyncを効かせるために、{ } で囲む必要がある。 | |
script{ async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" } | |
/ ad-name | |
ins.adsbygoogle | |
style="display:inline-block;width:336px;height:280px" | |
data-ad-client="hoge" | |
data-ad-slot="huga" | |
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
.urllist-title-link.recent-entries-title-link.urllist-title.recent-entries-title { | |
font-size: 0.9rem; | |
} | |
.urllist-title-link.entries-access-ranking-title-link.urllist-title.entries-access-ranking-title { | |
font-size: 0.9rem; | |
} | |
.hatena-module-body .hatena-urllist { | |
font-size: 0.9rem; | |
} |
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
const smtpConfig = { | |
host: 'smtp.gmail.com', | |
secure: true, // use SSL | |
auth: { | |
user: process.env.GMAIL_ADDRESS, | |
pass: process.env.GMAIL_PASSWORD, | |
}, | |
} | |
const transport = require('nodemailer').createTransport(smtpConfig) |
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
const CronJob = require('cron').CronJob | |
new CronJob({ | |
cronTime: '0 0 12 * * *', | |
onTick: () => { /* */ }, | |
start: true, | |
timeZone: 'Asia/Tokyo', | |
}) |