Skip to content

Instantly share code, notes, and snippets.

@simongcc
simongcc / 日中歌對照
Created June 22, 2019 02:32
日中歌對照
http://www.youtube.com/watch?v=Z3djBbe4Yw8 俺たちの旅/中村雅俊 (羅文 前程錦繡 原曲)
http://www.youtube.com/watch?v=9FqQOMkIAMs それが大事/大事MANブラザーズバンド (李克勤 紅日 原曲)
http://www.youtube.com/watch?v=kZdFC5s-eLY 愛は勝つ/KAN (張學友 壯志驕陽 原曲)
http://www.youtube.com/watch?v=nFrtSOYLwKU 悲しい気持ち/桑田佳祐 (古巨基 藍天與白雲 原曲)
http://www.youtube.com/watch?v=IFKyQxksGIo 負けないで/ZARD (坂井泉水係才女,但係好慘,死果時只有四十)
http://www.youtube.com/watch?v=EtX1fmIA9Go My revolution/渡辺美里 (電影反轉豬腩是王子主曲)
http://www.youtube.com/watch?v=krNlM7yVL68 Tsunami/Southern All Stars (感人情歌)
http://www.youtube.com/watch?v=CkmnW_V5OeUどんなときも/槇原敬之 (槇原敬之成名作)
http://www.youtube.com/watch?v=AmaAMnEyRYI 遥かなる夢に/Beyond (海闊天空日文版)
# Mac OS 10.12.16
Step
1. Open Disk Util
2. New Image > Blank Image
3. Settings:
Image Format: DVD/CD Master
Partition map: (No Partition map), if set, it will fail
Format: ExFat / MacOS both working
Size: Size needed
@simongcc
simongcc / exportExif.sh
Created May 9, 2019 00:24
Export Exif files from jpeg using shell script
# #!/bin/sh is called shebang
# ref: https://en.wikipedia.org/wiki/Shebang_(Unix)
# #!/usr/bin/env bash means looking into the path and call the first bash found in the path
# ref: https://unix.stackexchange.com/questions/29608/why-is-it-better-to-use-usr-bin-env-name-instead-of-path-to-name-as-my
# bash script if or
# ref: https://stackoverflow.com/questions/3826425/how-to-represent-multiple-conditions-in-a-shell-if-statement
# check file extension
@simongcc
simongcc / auto-put-back.scpt
Created May 2, 2019 09:33
Apple script for auto put back files
# original: https://discussions.apple.com/thread/7831626
# keyboard keycodes: https://eastmanreference.com/complete-list-of-applescript-key-codes
tell application "System Events"
tell process "Finder"
repeat 100 times
tell application "Finder" to open trash
tell application "Finder" to activate
key code 126
key down command
key code 51
@simongcc
simongcc / _archive-project.bat
Created April 26, 2019 11:29
Windows batch zip project files with date stamp (legacy backup method by Schedule)
@echo off
rem get local date time
for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j
rem set ldt=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2% %ldt:~8,2%:%ldt:~10,2%:%ldt:~12,6%
set ldt=%ldt:~0,4%%ldt:~4,2%%ldt:~6,2%-%ldt:~8,2%%ldt:~10,2%%ldt:~12,2%
set destination=U:\Project-by-Set-Grp
set destination2=Z:\_Project_Bak
set zip_exe="C:\Program Files\7-Zip"
set config_file="C:\Users\XXXXX\Dropbox\_work\_backup_data"
set dropbox_bak="U:\Project-by-Set-Grp"
@simongcc
simongcc / weinre-debug.bat
Created April 26, 2019 11:27
weinre debug batch file (Windows)
rem ref: https://www.broken-links.com/2013/06/28/remote-debugging-with-weinre/
weinre --boundHost -all-
/*
Custom admin dashboard
remove unnecessary admin dashboard panel
remove welcome panel
remove help tab
remove screen optons tab
remove color scheme picker
redirect after login
add custom widgets
with capabilities check example
@simongcc
simongcc / dabblet.css
Created April 6, 2019 07:40
CSS States
/* CSS States */
body {
background: url(http://dabblet.com/img/noise.png);
background-color: #F5F2F0;
font-family: Georgia, serif;
font-size: 18px;
line-height: 1.6em;
text-shadow: 0 2px 0 white;
color: #222;
}
@simongcc
simongcc / dabblet.css
Created April 6, 2019 06:36 — forked from JoelBesada/dabblet.css
CSS States
/* CSS States */
body {
background: url(http://dabblet.com/img/noise.png);
background-color: #F5F2F0;
font-family: Georgia, serif;
font-size: 18px;
line-height: 1.6em;
text-shadow: 0 2px 0 white;
color: #222;
}
@simongcc
simongcc / threejsBoilerplate.html
Created April 2, 2019 07:37 — forked from HalfdanJ/threejsBoilerplate.html
THREE.JS Boilerplate with controls
<!doctype html>
<html>
<head>
<title>Three.js Boilerplate</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r79/three.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/stats.js/r16/Stats.min.js"></script>