Skip to content

Instantly share code, notes, and snippets.

View jarsing's full-sized avatar

陳佳新 jarsing

View GitHub Profile
@jarsing
jarsing / liff-getos-launch-the-right-app.html
Last active September 18, 2023 03:56
使用 LIFF v2 判斷手機作業系統,並且一鍵開啟正確的 App 介紹頁( LIFF v2 範例)
<!DOCTYPE html>
<html>
<head>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="0">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>開啟「全民健保行動快易通」App</title>
</head>
<body>
@jarsing
jarsing / jpy_xrt.php
Created March 15, 2020 06:47
日幣匯率觀測站(LINE Notify範例)
#!/usr/bin/php
<?php
$csv = file_get_contents('https://rate.bot.com.tw/xrt/flcsv/0/day');
// Check line by line
foreach(preg_split("/((\r?\n)|(\r\n?))/", $csv) as $line) {
$values = explode(',', $line);