有没有办法在 Chrome 中创建一个键命令/键绑定/你想调用的任何东西,以便我可以从键盘调用书签?
我有一个书签可以在不刷新页面的情况下刷新 CSS - 实际上很酷,如果您有兴趣:http : //david.dojotoolkit.org/recss.html。
无论如何,我经常使用它,按Ctrl + Command + R或调用它会很好。想法?
我已经看过这个答案,但我正在寻找更直接的“按此键组合打开书签 3”的解决方案。
我有一个 shell 脚本来自动执行 git 提交并每晚推送:
auto_git_push.sh
#!/bin/sh
function automate(){
git add .
git commit -am "automated push $(date +"%Y-%m-%d")"
git push -u
}
cd ~/htdocs
automate
Run Code Online (Sandbox Code Playgroud)
如果我运行此命令,脚本将按预期工作:. ~/bin/auto_git_push.sh
但是,使用此 crontab 行(设置为每分钟进行测试)
* * * * * sh /home/hookedonwinter/bin/auto_git_push.sh
我收到以下错误:
/home/hookedonwinter/bin/auto_git_push.sh: 3: Syntax error: "(" unexpected
是什么导致了这个语法错误?
谢谢!
根据接受的答案进行编辑:
将脚本更改为:
#!/bin/bash
automate() {
git add .
git commit -am "automated push $(date +"%Y-%m-%d")"
git push -u
}
cd ~/htdocs
automate
Run Code Online (Sandbox Code Playgroud)
以及 crontab 行:
* * * * * /bin/bash /home/hookedonwinter/bin/auto_git_push.sh