Skip to content

Instantly share code, notes, and snippets.

View maboloshi's full-sized avatar

沙漠之子 maboloshi

  • 20:11 (UTC +08:00)
View GitHub Profile
@maboloshi
maboloshi / Generating_Access_Token.md
Last active February 18, 2019 13:19
[为github创建私人访问令牌] #github

Generating Access Token

As of 2013-05-16, you can generate API Access Tokens via the Web UI or via the GitHub API. All other authorization methods is deprecated.

Web

@maboloshi
maboloshi / get_latest_release_number.sh
Last active February 17, 2019 12:38 — forked from lukechilds/get_latest_release.sh
[Shell - Get latest release number from repository on GitHub ] 从GitHub上的存储库获取最新版本号, 不适用不规范发布 #github #shell
get_latest_release_number() {
curl --silent "https://github.com/$1/releases/latest" | sed 's#.*tag/\(.*\)".*#\1#'
}
# Usage
# $ get_latest_release_number "creationix/nvm"
# v0.34.0
@maboloshi
maboloshi / png2icons.sh
Created February 15, 2019 11:46
[快速生成 Mac App icns 图标 -- PNG2ICONS ] 需要准备一个 1024x1024 的png图片, 使用`png2icons.sh xxx.png`. 出处:http://www.jianshu.com/p/e74047f7cc91
#!/bin/bash
iconset_dir=tmp-$RANDOM.iconset
mkdir $iconset_dir
## 全部拷贝到命令行回车执行,执行结束之后去tmp.iconset查看十张图片是否生成好
sips -z 16 16 $1 --out $iconset_dir/icon_16x16.png &> /dev/null
sips -z 32 32 $1 --out $iconset_dir/[email protected] &> /dev/null
sips -z 32 32 $1 --out $iconset_dir/icon_32x32.png &> /dev/null
sips -z 64 64 $1 --out $iconset_dir/[email protected] &> /dev/null
@maboloshi
maboloshi / Set_Proxy.md
Last active June 16, 2025 07:21
[软件 Proxy 设置] #proxy #git #ssh #chrome #Sublime-Text-4

软件 Proxy 设置

Proxy 一般有2种协议,一种是 HTTP/HTTPS 协议,一种是 SOCKS 协议。优先使用 SOCKS 协议的 SOCKS5 版本。[2种协议的区别 待补充外部引用]

一般各平台的代理客户端除了提供一个本地的 socks5 Proxy ,还会提供一个本地的 http Proxy 。 在客户端相应设置中查看 socks5 协议监听的端口,HTTP Proxy 设置中查看 http 协议监听的端口。

注意:不少客户端提供混合模式,即socks5http端口号是同一个,所以不用费尽心思在软件设定中找单独的 http 端口设置功能了。

Chrome 浏览器 Proxy 设置

@maboloshi
maboloshi / .zshrc
Last active December 19, 2021 04:14
[Mac 相关设置]
export PATH="/usr/local/sbin:$PATH:$HOME/bin"
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="agnosterzak_black"
# 大小写敏感
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
@maboloshi
maboloshi / locals.js
Created February 11, 2019 05:18
[GitHub 汉化插件] 翻译数据库文件 from https://github.com/SickleSky/github-hans
var I18N = {};
I18N.conf = {
/**
* 要翻译的页面正则
*/
rePageClass: /\b(vis-public|page-(dashboard|profile|account|new-repo|create-org)|homepage|signup|session-authentication|oauth)\b/,
/**
* 匹配 pathname 页面的正则
@maboloshi
maboloshi / ape2flac.md
Created February 7, 2019 14:39
[ape2flac] ape格式转为flac格式

安装 Monkey's Audio 第三方解码器

brew tap fernandotcl/homebrew-fernandotcl
brew install monkeys-audio

安装 FLAC 解码器

brew install flac
@maboloshi
maboloshi / remove_ABC_Input.sh
Last active June 27, 2023 02:37
[mac 删除默认ABC输入法] mac默认ABC输入法,默认无法使用“系统偏好与设置”中删除。需要运行本脚本,运行后立即重启系统。生效修改
#!/bin/bash
cd ~/Library/Preferences/
cp com.apple.HIToolbox.plist com.apple.HIToolbox.plist.bak
alias plistbuddy='/usr/libexec/PlistBuddy'
dict=$(plistbuddy -c "Print AppleEnabledInputSources" com.apple.HIToolbox.plist| grep -c "Dict")
for i in {0..$dict};do
if [ "$(plistbuddy -c "Print AppleEnabledInputSources:$i:KeyboardLayout\ Name" com.apple.HIToolbox.plist 2>/dev/null)" = "ABC" ]
@maboloshi
maboloshi / inoreader-adblock-killer-filters.txt
Last active January 12, 2019 01:36
Inoreader Ads hide rules for uBlock
inoreader.com##.ad_title
inoreader.com##.ad_footer_remove
inoreader.com##[id^="leaderboard_ad-"]
inoreader.com###all_gad_57994
以下规则能够隐藏"AdBlock Detected"弹出框,但是快捷键会失效
inoreader.com##[id$=_wrapper].inno_dialog_modal:not([id*=dialog]):not(#xconfirm_wrapper)
inoreader.com##[id$=_modal_overlay].inno_dialog_modal_overlay:not([id*=dialog])
注意: