Skip to content

Instantly share code, notes, and snippets.

View yuessir's full-sized avatar
🎯
Focusing

yuessir yuessir

🎯
Focusing
View GitHub Profile
@pedrouid
pedrouid / setup-ssl.md
Last active April 29, 2024 21:39
Setup SSL with NGINX reverse proxy

Get a Free SSL Certificate With Let’s Encrypt

Let’s Encrypt is a free, automated, and open Certificate Authority.

  1. Install tools for using the Let's Encrypt certificates using Certbot
  sudo apt-get update \
  sudo apt-get install software-properties-common
@schnerd
schnerd / lazy-load-puppeteer.js
Created April 18, 2018 03:21
Lazy-loading content in Puppeteer
function wait (ms) {
return new Promise(resolve => setTimeout(() => resolve(), ms));
}
export default async function capture(browser, url) {
// Load the specified page
const page = await browser.newPage();
await page.goto(url, {waitUntil: 'load'});
// Get the height of the rendered page
@tomo-makes
tomo-makes / 20171217-docx-to-markdown-with-pandoc.md
Last active February 16, 2024 02:33
Wordファイル(.docx)をMarkdownへ変換する
$ pandoc -s <input>.docx --wrap=none --reference-links --extract-media=media -t gfm --filter ./despan.py -o <output>.md

いろいろと試した挙句、下記の観点でこれがベスト。

  • --wrap=none 勝手にwrapさせたくない(defaultではwrapしてしまう)
  • --reference-links
  • --extract-media=media docxに埋め込まれたpngなどを抽出できる
  • -t gfm github形式のmarkdownで出力したい(tableがpandoc defaultのmarkdownは他の形式になってしまう)