Skip to content

Instantly share code, notes, and snippets.

View siygle's full-sized avatar

S.Y. Lee siygle

View GitHub Profile
@siygle
siygle / gist:4e21f2e15d2e85c58954c27c34851f96
Created February 21, 2026 02:41
Convert Notion exported files to pure markdown files (for Obsidian)
#!/usr/bin/env node
import { readdir, readFile, writeFile, copyFile, mkdir, stat, access } from 'node:fs/promises';
import { join, basename, extname, dirname, resolve } from 'node:path';
// --- Configuration ---
const SOURCE_DIR = resolve(process.argv[2]);
const OUTPUT_DIR = resolve('./output');
if (!SOURCE_DIR) throw new Error("Export files not existed!");
@siygle
siygle / cloudflare-worker-youtube-dl.js
Created August 9, 2024 07:05 — forked from hizkifw/cloudflare-worker-youtube-dl.js
Download YouTube videos with Cloudflare Worker
/**
* cloudflare-worker-youtube-dl.js
* Get direct links to YouTube videos using Cloudflare Workers.
*
* Usage:
* GET /?v=dQw4w9WgXcQ
* -> Returns a JSON list of supported formats
*
* GET /?v=dQw4w9WgXcQ&f=251
* -> Returns a stream of the specified format ID
@siygle
siygle / wordpress-blog-latest.md
Last active September 10, 2022 03:00
wordpress-blog-latest.md

網路黑手的呢喃 Lastest Articles 👇 網路黑手的呢喃 #19 元宇宙的世界,真的還沒到… 網路黑手的呢喃 #18 OpenJS World 2022 速記 網路黑手的呢喃 #17 【推薦】Big Timber(台譯:終極伐木達人) 最近掉進樂高的坑 網路黑手的呢喃 #16

@siygle
siygle / my.goggles
Created June 30, 2022 13:40
my brave goggles
! name: No Pixnet
! description: Rerank results to remove pages / threads hosted on Pixnet.
! public: true
! author: siygle
$discard,site=pixnet.net
@siygle
siygle / Dockerfile
Created March 13, 2021 09:29
local dev mongodb transaction
FROM node:14
WORKDIR /usr/src/app
ARG NPM_TOKEN
COPY .npmrc .npmrc
COPY package*.json ./
RUN npm install
COPY . .

Keybase proof

I hereby claim:

  • I am ferrari on github.
  • I am ferrari (https://keybase.io/ferrari) on keybase.
  • I have a public key ASBECMk7tyvqoMc-kTTSRhCbMCWsfXFUez0GIyih3-boxAo

To claim this, I am signing this object:

@siygle
siygle / parse-csv-email.js
Created January 23, 2018 13:01
Parse CSV, filter and then output to another file (e.g, Email)
const parse = require('csv-parse')
const fs = require('fs')
const transform = require('stream-transform')
const isEmail = require('is-email')
const input = fs.createReadStream('./input.csv')
const output = fs.createWriteStream('./output.csv')
const parser = parse({ delimiter: ',' })
const transformer = transform((record, callback) => {
@siygle
siygle / hyper.js
Last active January 17, 2018 04:07 — forked from coco-napky/hyper.js
Hyper config for git bash in Windows (Use bash)
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 16,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@siygle
siygle / initial-comment.js
Last active January 12, 2018 08:39
Initialize comment issue
// 1. npm install sitemapper r2 cheerio p-each-series delay github
// 2. USERNAME=GITHUB_ACCOUNT REPO=GITHUB_REPO TOKEN=GITHUB_TOKEN SITEMAP=YOUR_SITEMAP_URL node initial-comment.js
#!/usr/bin/env node
const util = require('util')
const Sitemapper = require('sitemapper')
const sitemap = new Sitemapper()
const r2 = require('r2')
@siygle
siygle / dev.md
Last active October 10, 2017 02:34
My awesome JS

Develop

husky - Git hooks made easy

Details
npm install husky --save-dev

// Edit package.json
{