This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add a button to Collapse or Expand files in a Github Gist | |
// | |
// Install Tampermonkey and add this as a script | |
// ==UserScript== | |
// @name Github Gists: Expand / Collapse Files | |
// @namespace https://gist.github.com/Jaace/7b70d2bb19af63e10b144ed7d867eae0 | |
// @version 0.1 | |
// @description Add a button to expand or collapse files in github gists | |
// @author Jason Boyle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in $(ls *rst) | |
do | |
filename="${i%.*}" | |
echo "Converting $i to $filename.md" | |
pandoc "$i" -f rst -t gfm -o "$filename.md" | |
done |
launchctl
命令加载,卸载开机自动运行的服务,在 OS X 中,服务本身存储在 .plist
文件中(即 property list),这些文件的位置一般在 ~/Library/LaunchAgents
或 /Library/LaunchAgents
。可以使用 launchctl load $PATH_TO_LIST
和 unload 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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function () { | |
let rsshub_host = 'https://rsshub.app'; | |
let cnblog = 'https://www.cnblogs.com/'; | |
let csdn = 'https://blog.csdn.net/'; | |
let jianshu_user = '/jianshu/user/'; | |
let zhihu_user = '/zhihu/people/activities/'; | |
let zhihu_collection = '/zhihu/collection/'; | |
let zhihu_zhuanlan = '/zhihu/zhuanlan/'; | |
let bilibili_user = '/bilibili/user/video/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder