#
#依靠基本身份验证从github企业获取原始内容的单一代码。
#无需创建访问令牌并将其合并到url中。
#
#
#填空:
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
'------------------------------------------------------------------------------ | |
'名称:Reg2Bat_By Slore(生成同名bat文件,支持XP、WIN7、WIN7X64).vbs | |
'功能:REG文件转换为同名的BAT、CMD文件。 | |
'原文http://slore.blogbus.com/logs/52627038.html | |
' REG命令功能有限,仅支持常用类型。 | |
' (REG_SZ、REG_DWORD、REG_BINARY、 | |
' REG_EXPAND_SZ、REG_MULTI_SZ) | |
' | |
' By Slore 【修改by 代码飞扬】 | |
' 更新于:2017年2月16日 |
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 | |
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/icon_16x16@2x.png &> /dev/null | |
sips -z 32 32 $1 --out $iconset_dir/icon_32x32.png &> /dev/null | |
sips -z 64 64 $1 --out $iconset_dir/icon_32x32@2x.png &> /dev/null |
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
var I18N = {}; | |
I18N.conf = { | |
/** | |
* 要翻译的页面正则 | |
*/ | |
rePageClass: /\b(vis-public|page-(dashboard|profile|account|new-repo|create-org)|homepage|signup|session-authentication|oauth)\b/, | |
/** | |
* 匹配 pathname 页面的正则 |
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 | |
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" ] |
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
function create_ref { | |
param ( | |
[Parameter(Mandatory = $true)] | |
[String]$Token, | |
[Parameter(Mandatory = $true)] | |
[String]$RepoNwo, | |
[Parameter(Mandatory = $true)] | |
[String]$Ref, |
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: