Skip to content

Instantly share code, notes, and snippets.

View imleafz's full-sized avatar
🚑
Working

James Fang imleafz

🚑
Working
View GitHub Profile
@imleafz
imleafz / frp systemd.md
Created November 2, 2018 01:24 — forked from ihipop/frp systemd.md
FRP systemd 启动脚本

/etc/systemd/system/frps.service

[Unit]
Description=FRP Server Daemon

[Service]
Type=simple
ExecStartPre=-/usr/sbin/setcap cap_net_bind_service=+ep /opt/bin/frps
ExecStart=/opt/bin/frps -c /opt/etc/frps.ini
Restart=always
@imleafz
imleafz / cd_finder_path.bashrc
Last active September 13, 2015 16:28 — forked from leecade/cd_finder_path.bashrc
bash:cd_finder_path
function cd.() {
# 检查 Finder 是否执行
if [ "`osascript -e 'tell application "System Events" to "Finder" is in (get name of processes)'`" = "true" ]; then
# 检查当前状态是否可以获取路径
if [ "`osascript -e 'tell application "Finder" to get collapsed of front window' 2>/dev/null`" != "false" ]; then
if [ "`osascript -e 'tell application "System Events" to "TotalFinderCrashWatcher" is in (get name of processes)'`" = "true" ];then