Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

沙漠之子 maboloshi

💭
I may be slow to respond.
  • 11:17 (UTC +08:00)
View GitHub Profile
@maboloshi
maboloshi / inoreader-adblock-killer-filters.txt
Last active January 12, 2019 01:36
Inoreader Ads hide rules for uBlock
View inoreader-adblock-killer-filters.txt
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])
注意:
@maboloshi
maboloshi / ape2flac.md
Created February 7, 2019 14:39
[ape2flac] ape格式转为flac格式
View ape2flac.md

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

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

安装 FLAC 解码器

brew install flac
@maboloshi
maboloshi / remove_ABC_Input.sh
Last active February 7, 2019 16:21
[mac 删除默认ABC输入法] mac默认ABC输入法,默认无法使用“系统偏好与设置”中删除。需要运行本脚本,运行后立即重启系统。生效修改
View remove_ABC_Input.sh
#!/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 / 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
View get_latest_release_number.sh
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 / Generating_Access_Token.md
Last active February 18, 2019 13:19
[为github创建私人访问令牌] #github
View Generating_Access_Token.md

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

View 使用 Homebrew 管理 Mac 的后台服务.md

摘译自 robots.thoughtbot.com

launchctl 命令加载,卸载开机自动运行的服务,在 OS X 中,服务本身存储在 .plist 文件中(即 property list),这些文件的位置一般在 ~/Library/LaunchAgents/Library/LaunchAgents。可以使用 launchctl load $PATH_TO_LISTunload them with launchctl unload $PATH_TO_LIST 命令来加载/卸载他们。加载就是允许这个程序开机执行,卸载反之。

如果你使用 Homebrew 安装过 mysql 那么下面的安装后提示你可能比较熟悉

To have launchd start mysql at login:
   ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
View SublimeText3 File Context Menu.inf
[Version]
Signature="$Windows NT$"
[DefaultInstall]
AddReg=SublimeText3
[SublimeText3]
hkcr,"*\\shell\\SublimeText3",,,"Edit With Sublime Text"
hkcr,"*\\shell\\SublimeText3","Icon",0x20000,"%1%\sublime_text.exe, 0"
hkcr,"*\\shell\\SublimeText3\\command",,,"""%1%\sublime_text.exe"" ""%%1"" %%*"
@maboloshi
maboloshi / rst2md.sh
Last active March 9, 2019 11:31 — forked from zorbax/rst2md.sh
[reStructuredText to Markdown] #shell
View rst2md.sh
for i in $(ls *rst)
do
filename="${i%.*}"
echo "Converting $i to $filename.md"
pandoc "$i" -f rst -t gfm -o "$filename.md"
done
@maboloshi
maboloshi / mega-dl.sh
Last active March 15, 2019 00:55 — forked from KenMacD/mega-dl.sh
[Download MEGA files from command-line] `./mega-dl.sh '<URL>' <file name>` (Note the single quotes around the URL, otherwise bash complains "event not found") #mega #shell
View mega-dl.sh
#!/bin/bash
# 原作者: t0n1
# 来自: http://hacktracking.blogspot.ca/2013/07/download-mega-files-from-command-line.html
#
# 修改: maboloshi
# <file_url>: https://mega.nz/#!<id>!<decyption Key>
url=$1
out_file="$2"
@maboloshi
maboloshi / .travis.yml
Last active September 8, 2019 05:57
maboloshi.github.io 的.travis.yml, gulpfile.js设置存档
View .travis.yml
language: node_js
node_js:
- '6'
# 缓存依赖,节省持续集成时间
cache:
directories:
- node_modules
- themes