Skip to content

Instantly share code, notes, and snippets.

@jackiewu
jackiewu / bash-path-vars
Created June 1, 2020 03:32 — forked from caruccio/bash-path-vars
Path manipulation with bash vars
$ FILE=/some/path/to/file.txt
###################################
### Remove matching suffix pattern
###################################
$ echo ${FILE%.*} # remove ext
/some/path/to/file
$ FILE=/some/path/to/file.txt.jpg.gpg # note various file exts
@jackiewu
jackiewu / my.cnf
Created May 19, 2020 02:43
my my.cnf
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
port = 3306
server_id = 123456
datadir = /var/lib/mysql
tmpdir = /var/lib/mysql
@jackiewu
jackiewu / harbor.sh
Last active April 8, 2020 08:44 — forked from kacole2/harbor.sh
Quick Start Harbor Installation Script on Ubuntu 18.04
#!/bin/bash
#Harbor on Ubuntu 18.04
#Prompt for the user to ask if the install should use the IP Address or Fully Qualified Domain Name of the Harbor Server
#PS3='Would you like to install Harbor based on IP or FQDN? '
#select option in IP FQDN
#do
# case $option in
# IP)
We couldn’t find that file to show.
@jackiewu
jackiewu / README.md
Created February 18, 2019 01:22
SCRIPT-8
@jackiewu
jackiewu / README.md
Created February 18, 2019 01:17
SCRIPT-8
@jackiewu
jackiewu / README.md
Created February 18, 2019 01:13
SCRIPT-8
@jackiewu
jackiewu / label.css
Created July 2, 2016 07:21
Simple Label
a.single-product {
position: relative;
overflow: hidden;
display: block;
}
a.single-product::before {
content: '售出';
display: block;
background-color: #de2424;
@jackiewu
jackiewu / translate.js
Last active August 24, 2022 09:29
網頁翻譯: 簡體中文 <-> 繁體中文
// 在瀏覽器網址列輸入以下程式碼,或者是新增一個我的最愛項目,把網址的內容改為以下即可。
// 搜尋currentEncoding=2,targetEncoding=1 (簡轉繁)反之(繁轉簡)請自行修改
javascript:"use strict";var ts=document.createElement("script");ts.setAttribute("src","https://52.197.103.234/chinese_convert.js");var _document$getElements=document.getElementsByTagName("head"),head=_document$getElements[0];head.appendChild(ts),ts.onload=function(){currentEncoding=2,targetEncoding=1,translateBody()};
// Example "姓名" (&#22995;&#21517;)
// it can be used for placehoder of input
"姓名".charCodeAt(0)
> 22995
"姓名".charCodeAt(1)
> 21517
"姓名".charCodeAt(0).toString(16)
> "59d3"