most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
#!/bin/sh | |
# on ubuntu: need some utils & dev libs | |
sudo apt-get install apache2-utils openssl libssl-dev libpcre3-dev | |
# compile nginx | |
cd /tmp | |
curl http://nginx.org/download/nginx-0.7.64.tar.gz | tar xz | |
cd nginx* | |
./configure --with-http_ssl_module --with-http_dav_module \ |
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |
// ==UserScript== | |
// @name douban_xiami | |
// @namespace org.kejun | |
// @include http://music.douban.com/* | |
// ==/UserScript== | |
//使用说明: | |
// 1. 安装本脚本到Greasemonkey | |
// 2. 到http://music.douban.com/recommended | |
// 3. 点击专辑封面会自动用虾米播放(如果窗口没弹出,检查是否被浏览器拦截) |
-- from http://veritrope.com/code/copy-omnifocus-item-uri-to-evernote/ | |
tell front window of application "OmniFocus" | |
try | |
set theTrees to selected trees of content | |
if (count of theTrees) < 1 then | |
set theTrees to selected trees of sidebar | |
end if | |
if (count of theTrees) < 1 then |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
To run this, you can try:
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New new -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
tell application "OmniFocus" | |
tell content of first document window of front document | |
set tasksSelected to value of (selected trees where (class of its value is not item) and (class of its value is not folder)) | |
if length of tasksSelected is 0 then | |
display alert "Select some tasks in OmniFocus." | |
return | |
end if | |
end tell | |