Skip to content

Instantly share code, notes, and snippets.

View typebrook's full-sized avatar

Hsieh Chin Fan typebrook

View GitHub Profile
@mcdlee
mcdlee / u_and_n.ipynb
Last active June 23, 2020 02:29
Using PyTorch to classify my writing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@bingluen
bingluen / health_center.csv
Created February 5, 2020 03:56
由 Howard 於 g0v 提供之可能配送地點資訊
區域 地址 Response_Address Response_X Response_Y 電話
新北市平溪區 22641新北市平溪區公園街17號1樓 新北市平溪區石底里3鄰公園街17號 121.737185 25.024681 02-24951015
新北市貢寮區 228新北市貢寮區朝陽街70巷10號 新北市貢寮區貢寮里8鄰朝陽街70巷10號 121.909462 25.022576 02-24901431#110
新北市坪林區 232新北市坪林區坪林街104號 找不到指定的門牌地址。 02-26656272#205
新北市烏來區 233新北市烏來區新烏路五段109號 新北市烏來區忠治里2鄰新烏路五段109號 121.547977 24.871966 02-26617200#15
新竹縣橫山鄉 312新竹縣橫山鄉新興街141巷10號 新竹縣橫山鄉大肚村3鄰新興街141巷10號 121.13928 24.717563 03-5932004
新竹縣峨眉鄉 315新竹縣峨眉鄉峨眉街5號 新竹縣峨眉鄉峨眉村2鄰峨眉街5號 121.021409 24.688418 03-5800314
新竹縣五峰鄉 31141新竹縣五峰鄉6鄰99號 找不到指定的門牌地址。 03-5851005
宜蘭縣大同鄉 267宜蘭縣大同鄉崙埤村朝陽40號 宜蘭縣大同鄉崙埤村4鄰朝陽40號 121.608845 24.677855 03-9801160
苗栗縣南庄鄉 353苗栗縣南庄鄉東村大同路17號 苗栗縣南庄鄉東村4鄰大同路17號 120.999979 24.597334 037-822480
@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號,臺北市松山區東
@FhdAlotaibi
FhdAlotaibi / DownloadProgressLiveData.kt
Last active November 20, 2023 11:27
Observe Download manager progress using LiveData and Coroutine
data class DownloadItem(val bytesDownloadedSoFar: Long = -1, val totalSizeBytes: Long = -1, val status: Int)
class DownloadProgressLiveData(private val application: Application, private val requestId: Long) : LiveData<DownloadItem>(), CoroutineScope {
private val downloadManager by lazy {
application.getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager
}
private val job = Job()
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var domStyle = document.createElement("style");
domStyle.append(
'* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }\
* * { background-color: rgba(0,255,0,.2) !important; }\
* * * { background-color: rgba(0,0,255,.2) !important; }\
* * * * { background-color: rgba(255,0,255,.2) !important; }\
* * * * * { background-color: rgba(0,255,255,.2) !important; }\
@ErkHal
ErkHal / Steam on Arch Linux - Switch Pro Controller configuration.md
Created April 25, 2019 16:11
(Hopefully) helpful instructions about using a Switch Pro controller with Steam client on Arch Linux

Steam for Arch Linux - Switch Pro Controller Configuration (Wired)

The following instructions are based on a reddit comment of u/zolixes and cleaned up/modified by me.

The following has been tested to work with:

  • Arch Linux with kernel version 5.0.9
  • Steam build jenkins-steam-runtime-beta-release_0.20190320.2 (As seen from Help -> System Information -> Steam Runtime Version)

There is a file: /lib/udev/rules/99-steam-controller-perms.rules (if no rules related to steam are found install the steam-devices package and this file will appear).

NOTE: The file might be named differently and the number in front of it can differ from the example. In my case this was:

@humblehacker
humblehacker / mutablelivedata.md
Last active March 25, 2023 02:14
Don't expose MutableLiveData
@ww9
ww9 / gist_blog.md
Last active January 12, 2024 23:00
Using Gist as a blog #blog

Blogging with Gist

Gist simplicity can turn blogging into a liberating experience.

Pros Cons
✅ Free, simple, fast, hassle-free ❌ Image upload in comments only
✅ Tagging ❌ No post pinning
✅ Search ❌ Doesn't look like a blog
✅ Revisions ❌ Unfriendly URLs
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
const syncMove = require('@mapbox/mapbox-gl-sync-move');
mapboxgl.accessToken = 'pk.eyJ1IjoiYnJzYmwiLCJhIjoiY2phYmxrZ2VnMDB6aDJ6cGxpeDhhZHNrYyJ9.M73MEVN66tbuq0ATBxqIDQ';
const lr = new mapboxgl.Map({
container: 'lr', // container id
style: 'mapbox://styles/brsbl/cjo2p4xjq55b12rp6yihgdcs5', // stylesheet location
center: [-74.50, 40], // starting position [lng, lat]