Skip to content

Instantly share code, notes, and snippets.

View aliyoge's full-sized avatar

Jordy Wong aliyoge

View GitHub Profile
# 用户配置目录
/etc/firewalld/
# 查看防火墙状态
firewall-cmd --state
# 查看防火墙规则
firewall-cmd --list-all
# 查看已近开放的端口
nohup ./frpc -c frpc.ini >log 2>&1 & # 保存日志
nohup ./frpc -c frpc.ini >/dev/null 2>&1 & # 丢弃日志
netstat -tupln | grep vnc
cat /etc/issue # 适用于所有
cat /etc/redhat-release
@aliyoge
aliyoge / generate_icns
Last active December 30, 2019 07:03
快速生成MacAppIcons。 1.准备一个 1024 * 1024 的png图片,假设名字为 pic.png 2.命令行 $ mkdir tmp.iconset,创建一个临时目录存放不同大小的图片 3.把原图片转为不同大小的图片,并放入上面的临时目录 4.全部拷贝到命令行回车执行,执行结束之后去tmp.iconset查看十张图片是否生成好
iconutil -c icns tmp.iconset -o Icon.icns
open -n /Applications/WeChat.app/Contents/MacOS/WeChat
@aliyoge
aliyoge / upload.sh
Created July 4, 2019 01:03
使用curl上传文件
curl -F "filename=@/Users/wenjunhuang/Downloads/group.png" https://api.im.jpush.cn/v1/resource?type=image -u "75035df1bd16ec971919cb07:20c398cb9c9d5a3abef55867"
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
on MouseIsAttached()
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.mouse"
end tell
tell application "System Events" to tell process "System Preferences"
tell radio button 1 of tab group 1 of window 1 to if value is 0 then click
tell checkbox 1 of tab group 1 of window 1 to if value is 1 then click
end tell
tell application "System Preferences" to quit
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleGetInfoString</key>
<string>1.0 Copyright © 2018 Headsoft. All rights reserved.</string>
<key>CFBundleIdentifier</key>
<string>com.Headsoft.USBPorts</string>