Skip to content

Instantly share code, notes, and snippets.

# https://hub.docker.com/r/jhipster/jhipster
# https://www.jhipster.tech/installation/
# docker container exec -it --user root jhipster bash
# docker container stop jhipster
# docker container rm jhipster
version: '3.8'
services:
jhipster:
image: jhipster/jhipster:v7.9.4
container_name: jhipster
@scott0228
scott0228 / commit-msg
Last active September 1, 2022 01:25
git commit 檢查是否有包含 jira issue
#!/bin/sh
HOOK_FILE=$1
COMMIT_MSG=`head -n1 $HOOK_FILE`
PATTERN="([A-Z]+-[0-9]+)|(Merge branch)"
if [[ ! ${COMMIT_MSG} =~ $PATTERN ]]; then
echo ""
echo "'$COMMIT_MSG' is missing JIRA Ticket Number."
echo " example: 'JIRA-1234: my commit'"
echo ""
exit 1
// ==UserScript==
// @name 簡繁轉換
// @namespace https://scott0228.blogspot.com/
// @version 0.5
// @description 簡體直接轉繁體啦
// @author Scott Yang
// @include *.*
// @exclude http://*.tw/*
// @exclude https://*.tw/*
// 0.5 增加用詞轉換
@scott0228
scott0228 / AdGuardHome.yaml
Last active November 15, 2020 17:54
AdGuard Home
bind_host: 0.0.0.0
bind_port: 80
users:
- name:
password:
language: ""
rlimit_nofile: 0
web_session_ttl: 720
dns:
bind_host: 0.0.0.0
@scott0228
scott0228 / ios-10-all-font-names.swift
Created December 20, 2017 08:06 — forked from tadija/FontNames-iOS-17.4.swift
iOS 10 - All Font Names
UIFont.familyNames.sorted().forEach{ familyName in
print("*** \(familyName) ***")
UIFont.fontNames(forFamilyName: familyName).forEach { fontName in
print("\(fontName)")
}
print("---------------------")
}
/*
*** Academy Engraved LET ***
@scott0228
scott0228 / MergeWorkSheet.java
Created July 21, 2016 10:14
合併 excel 檔案
import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
@scott0228
scott0228 / Util.java
Created June 20, 2016 03:56
POI Excel 多檔案工作表合併
import java.util.HashMap;
import java.util.Map;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.util.CellRangeAddress;
/**
@scott0228
scott0228 / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../paper-calculator/paper-calculator.html">
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<polymer-element name="my-element">
#!/bin/bash
# 先取得 SSID
ssid=$(networksetup -getairportnetwork en1 | cut -c 24-)
# 依 SSID 決定要用哪個 location ,可利用 scselect 指令來列出所有的 location
if [ $ssid = "ScottAP" ]
then
location="Work"
else
location="Automatic"