Skip to content

Instantly share code, notes, and snippets.

View johnteee's full-sized avatar

John Lee johnteee

  • Taipei
View GitHub Profile
@johnteee
johnteee / obs-start.sh
Created May 12, 2017 04:52 — forked from nooitaf/obs-start.sh
obs cli options
obs --startrecording --startstreaming
# For OBS Studio,
# --collection [scene collection name],
# --profile [profile name],
# --scene [scene name],
# --startstreaming,
# --startrecording.
# https://obsproject.com/forum/threads/obs-studio-command-line-parameters.56185/
@johnteee
johnteee / .tmux.conf
Created July 7, 2017 03:42 — forked from jakelazaroff/.tmux.conf
Some screen key bindings for tmux.
# set prefix to ctrl+a
unbind C-b
set -g prefix C-a
bind a send-prefix
# use space to cycle between windows
bind-key C-a last-window
bind-key Space next-window
bind-key C-Space previous-window
@johnteee
johnteee / FacebookDebugger.php
Created August 15, 2017 09:08 — forked from FrostyX/FacebookDebugger.php
Facebook API - Force facebook to reload cache from your website
<?php
class FacebookDebugger
{
/*
* https://developers.facebook.com/docs/opengraph/using-objects
*
* Updating Objects
*
* When an action is published, or a Like button pointing to the object clicked,
* Facebook will 'scrape' the HTML page of the object and read the meta tags.
HanWangCC02 酷儷海報
HanWangCC15 正海報
HanWangFangSongMedium 中仿宋
HanWang FangSongMedium-Gb5 中仿宋簡體
HanWangGB06 鋼筆行楷
HanWangGSolid06cut1 超黑俏皮動物
HanWangHeiHeavy 特黑
HanWangHeiLight 細黑
HanWang KaiBold-Gb5 粗楷體簡體
HanWangKaiMediumChuIn 中楷注音體
public Document getDocument(LatLng start, LatLng end, List<LatLng> wayPoints, TravelMode mode) {
String url = "https://maps.googleapis.com/maps/api/directions/xml?"
+ "origin=" + start.latitude + "," + start.longitude
+ "&destination=" + end.latitude + "," + end.longitude
+ "&sensor=false&units=metric&mode=" + mode.toString().toLowerCase()
+ "&key=" + MyApplication.getInstance().getString(R.string.API_KEY_GOOGLE_GEO)
;
if (wayPoints != null && wayPoints.size() > 0) {
url += "&waypoints=";
@johnteee
johnteee / index.html
Created February 9, 2018 09:18
Siema - perPage (object)
<div class="container">
<div class="siema_wrapper">
<div class="siema">
<div class="item">&nbsp;</div>
<div><img src="https://pawelgrzybek.com/siema/assets/siema--pink.svg" alt="Siema image" /></div>
<div><img src="https://pawelgrzybek.com/siema/assets/siema--yellow.svg" alt="Siema image" /></div>
<div><img src="https://pawelgrzybek.com/siema/assets/siema--pink.svg" alt="Siema image" /></div>
<div><img src="https://pawelgrzybek.com/siema/assets/siema--yellow.svg" alt="Siema image" /></div>
<div></div>
</div>
@johnteee
johnteee / SimpleStore.js
Last active March 6, 2018 06:04 — forked from ksafranski/SimpleStore.js
Simple localStorage function with Cookie fallback for older browsers.
/**
* Simple localStorage with Cookie Fallback
* v.1.0.0
*
* USAGE:
* ----------------------------------------
* Set New / Modify:
* store('my_key', 'some_value');
*
* Retrieve:
@johnteee
johnteee / getGPSLocationsByAddresses.js
Last active March 7, 2018 08:56
getGPSLocationsByAddresses
var list = [
'高雄市建工路497號',
'桃園市中壢區中北路111號',
'台北市中正區濟南路2段46號B1',
'台北市大同區重慶北路二段171號',
'台北市中山區樂群三路218號',
'台北市松山區三民路160號',
'台北市萬華區桂林路1號',
'台北市信義區東興路45號B1',
'台北市士林區德行西路47號',
@johnteee
johnteee / ustel.html
Created March 8, 2018 13:15 — forked from Miserlou/ustel.html
Validating a US (or international) phone number with Parsley and libphonenumber-js
<!-- requirements -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/parsley.js/2.6.2/parsley.min.js"></script>
<script src="https://halt-hammerzeit.github.io/libphonenumber-js/libphonenumber-js.min.js"></script>
<!-- custom validator -->
<script type="text/javascript">
$(document).ready(function() {
window.Parsley.addValidator('ustel', {
requirementType: 'string',
validateString: function(value) {
let data = [{"County":"嘉義縣","PublishAgency":"環境保護署","PublishTime":"2018-03-05 09:00","SiteName":"塔塔加","UVI":"","WGS84Lat":"23,28,14.19","WGS84Lon":"120,52,50.06"},{"County":"嘉義市","PublishAgency":"中央氣象局","PublishTime":"2018-03-09 15:00","SiteName":"嘉義","UVI":"3.32","WGS84Lat":"23,29,45","WGS84Lon":"120,25,58"},{"County":"臺中市","PublishAgency":"中央氣象局","PublishTime":"2018-03-09 15:00","SiteName":"臺中","UVI":"2.38","WGS84Lat":"24,08,45","WGS84Lon":"120,41,03"},{"County":"澎湖縣","PublishAgency":"中央氣象局","PublishTime":"2018-03-09 15:00","SiteName":"澎湖","UVI":"4.77","WGS84Lat":"23,33,56","WGS84Lon":"119,33,47"},{"County":"宜蘭縣","PublishAgency":"中央氣象局","PublishTime":"2018-03-09 15:00","SiteName":"宜蘭","UVI":"4.10","WGS84Lat":"24,45,50","WGS84Lon":"121,45,24"},{"County":"金門縣","PublishAgency":"中央氣象局","PublishTime":"2018-03-09 15:00","SiteName":"金門","UVI":"5.34","WGS84Lat":"24,24,26","WGS84Lon":"118,17,21"},{"County":"南投縣","PublishAgency":"中央氣象局","PublishTime":"2018-03-09 15:00","SiteName":"日月潭","UVI":"1.42","WGS84Lat":"23,52,