Skip to content

Instantly share code, notes, and snippets.

View YuerLee's full-sized avatar

Yuer Lee YuerLee

  • Tradebeyond (former CBX Software)
  • Taiwan
  • 01:05 (UTC +08:00)
  • LinkedIn in/yuerlee
View GitHub Profile
@IrenaYuan
IrenaYuan / prompts_v1.0
Created April 11, 2024 04:38
Readwise reader - Ghostreader prompts
寫下三到五個簡短列點,告訴我這篇文章在說什麼,請使用繁體中文,遇到專有名詞、人名請保持原狀。如果內容涵蓋過多,可以允許超過五個列點,但句子就需要更加簡潔。
"""
Title: {{ document.title }}
Author: {{ document.author }}
Domain: {{ document.domain}}
{% if (document.content | count_tokens) > 2000 %}
{{ document.content | central_sentences | join('\n\n') }}
{% else %}
{{ document.content }}
@x3388638
x3388638 / HistoryLogger.user.js
Created January 21, 2021 08:16
Log all pushState and replaceState events in console
// ==UserScript==
// @name HistoryLogger
// @namespace 2yc.tw
// @version 0.1
// @description Log all pushState and replaceState events in console
// @author YY
// @match *://*/*
// @grant none
// ==/UserScript==
@bingluen
bingluen / drugstore-gps.csv
Created February 4, 2020 15:55
健保特約醫事機構-藥局資料含座標
We can't make this file beautiful and searchable because it's too large.
醫事機構代碼,醫事機構名稱,醫事機構種類 ,電話,地 址 ,Response_Address,Response_X,Response_Y,分區業務組,特約類別,服務項目 ,診療科別 ,終止合約或歇業日期 ,固定看診時段 ,備註
5901012203,博荃藥局,藥師自營,02 -27316736,台北市松山區敦化北路4巷51號,臺北市松山區中正里18鄰敦化北路4巷51號,121.544742,25.050063,臺北業務組,藥局,,,,星期一上午看診、星期二上午看診、星期三上午看診、星期四上午看診、星期五上午看診、星期六上午看診、星期日上午休診、星期一下午看診、星期二下午看診、星期三下午看診、星期四下午看診、星期五下午看診、星期六下午看診、星期日下午休診、星期一晚上看診、星期二晚上看診、星期三晚上看診、星期四晚上看診、星期五晚上看診、星期六晚上看診、星期日晚上休診,"如遇國定連續假期,藥局公休"
5901012383,德川中西藥局,藥劑生自營,02 -27683399,台北市松山區八德路4段96號,臺北市松山區復盛里17鄰八德路四段96號,121.560660,25.048360,臺北業務組,藥局,,,,星期一上午看診、星期二上午看診、星期三上午看診、星期四上午看診、星期五上午看診、星期六上午休診、星期日上午休診、星期一下午看診、星期二下午看診、星期三下午看診、星期四下午看診、星期五下午看診、星期六下午休診、星期日下午看診、星期一晚上看診、星期二晚上看診、星期三晚上看診、星期四晚上看診、星期五晚上看診、星期六晚上休診、星期日晚上休診,
5901012409,家音藥局,藥師自營,02 -37652080,台北市松山區民生東路5段73號,臺北市松山區東榮里7鄰民生東路五段73號,121.558489,25.058709,臺北業務組,藥局,,,,星期一上午看診、星期二上午看診、星期三上午看診、星期四上午看診、星期五上午看診、星期六上午看診、星期日上午看診、星期一下午看診、星期二下午看診、星期三下午看診、星期四下午看診、星期五下午看診、星期六下午看診、星期日下午看診、星期一晚上看診、星期二晚上看診、星期三晚上看診、星期四晚上看診、星期五晚上看診、星期六晚上看診、星期日晚上看診,早上9:00到晚上11:00
5901012454,敦北藥局,藥師自營,02 -27155691,台北市松山區民生東路4段80巷5號,臺北市松山區東
@darrenmothersele
darrenmothersele / drop-zone-directive.ts
Last active December 27, 2023 20:23
Angular Drag and Drop File Directive
import { Directive, EventEmitter, HostBinding, HostListener, Input, Output } from '@angular/core';
// Angular Drag and Drop File
//
// Add this directive to an element to turn it into a dropzone
// for drag and drop of files.
// Example:
//
// <div (appDropZone)="onDrop($event)"></div>
//
@LayZeeDK
LayZeeDK / angular-cli-node-js-typescript-rxjs-compatiblity-matrix.csv
Last active March 17, 2024 13:40
Angular CLI, Angular, Node.js, TypeScript, and RxJS version compatibility matrix. Officially part of the Angular documentation as of 2023-04-19 https://angular.io/guide/versions
Angular CLI version Angular version Node.js version TypeScript version RxJS version
~16.0.0 ~16.0.0 ^16.13.0 || ^18.10.0 >=4.9.5 <5.1.0 ^6.5.5 || ^7.4.0
~15.2.0 ~15.2.0 ^14.20.0 || ^16.13.0 || ^18.10.0 >=4.8.4 <5.0.0 ^6.5.5 || ^7.4.0
~15.1.0 ~15.1.0 ^14.20.0 || ^16.13.0 || ^18.10.0 >=4.8.4 <5.0.0 ^6.5.5 || ^7.4.0
~15.0.5 ~15.0.4 ^14.20.0 || ^16.13.0 || ^18.10.0 ~4.8.4 ^6.5.5 || ^7.4.0
~14.3.0 ~14.3.0 ^14.15.0 || ^16.10.0 >=4.6.4 <4.9.0 ^6.5.5 || ^7.4.0
~14.2.0 ~14.2.0 ^14.15.0 || ^16.10.0 >=4.6.4 <4.9.0 ^6.5.5 || ^7.4.0
~14.1.3 ~14.1.3 ^14.15.0 || ^16.10.0 >=4.6.4 <4.8.0 ^6.5.5 || ^7.4.0
~14.0.7 ~14.0.7 ^14.15.0 || ^16.10.0 >=4.6.4 <4.8.0 ^6.5.5 || ^7.4.0
~13.3.0 ~13.3.0 ^12.20.2 || ^14.15.0 || ^16.10.0 >=4.4.4 <4.7.0 ^6.5.5 || ^7.4.0
@ceejbot
ceejbot / esm_in_node_proposal.md
Last active July 17, 2023 02:45
npm's proposal for supporting ES modules in node

ESM modules in node: npm edition

The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.

Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.

This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma

@doggy8088
doggy8088 / Angular 17 Dev Setup.md
Last active April 22, 2024 23:59
Angular 17 開發環境說明

Angular 17 開發環境說明

為了能讓大家能夠順利的建立起 Angular 17 開發環境,以下是需要安裝的相關軟體與安裝步驟與說明。

Angular LOGO

[ 作業系統 ]

  • Windows 10 以上版本
  • Mac OS X 10.6 以上版本
@jcouyang
jcouyang / README.org
Last active December 9, 2023 16:46
Promise All with Limit of Concurrent N

The Promise All Problem

in case of processing a very large array e.g. Promise.all(A_VERY_LARGE_ARRAY_OF_XHR_PROMISE)

which would probably blow you browser memory by trying to send all requests at the same time

solution is limit the concurrent of requests, and wrap promise in thunk

Promise.allConcurrent(2)([()=>fetch('BLAH1'), ()=>fetch('BLAH2'),...()=>fetch('BLAHN')])

|-------------------------------------------------------------------------------------------------------|
| Library | Insert | findPk | complex| hydrate| with | memory usage | time |
| --------------------------------:| ------:| ------:| ------:| ------:| ------:| ------------:| ------:|
| PDO | 72 | 12 | 29 | 69 | 220 | 1,689,176 | 0.41 |
| Maghead | 395 | 9 | 176 | 205 | 365 | 10,485,760 | 1.16 |
| | | | | | | | |
| LessQL | 366 | 70 | 377 | 364 | 363 | 10,078,872 | 1.55 |
| | | | | | | | |
| YiiM | 714 | 86 | 436 | 292 | 614 | 8,388,608 | 2.16 |
| YiiMWithCache | 693 | 83 | 435 | 303

Harp compiled site deployment to GitHub pages

  • Set up the repository : PUBLIC & initialize the repository with a readme file

  • Clone it and navigate to the repository folder

	$ git clone https://github.com/user/repository
	$ cd repository/