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| import sublime, sublime_plugin, os, re | |
| class FileNameComplete(sublime_plugin.EventListener): | |
| def on_query_completions(self, view, prefix, locations): | |
| completions = [] | |
| sel = view.sel()[0].a | |
| if "string" in view.syntax_name(sel): | |
| pass |
| // Lack of tail call optimization in JS | |
| var sum = function(x, y) { | |
| return y > 0 ? sum(x + 1, y - 1) : | |
| y < 0 ? sum(x - 1, y + 1) : | |
| x | |
| } | |
| sum(20, 100000) // => RangeError: Maximum call stack size exceeded | |
| // Using workaround |
| "\e[1~": beginning-of-line | |
| "\e[4~": end-of-line | |
| "\e[5~": history-search-backward | |
| "\e[6~": history-search-forward | |
| "\e[3~": delete-char | |
| "\e[2~": quoted-insert | |
| "\e[5C": forward-word | |
| "\e[5D": backward-word | |
| "\e\e[C": forward-word | |
| "\e\e[D": backward-word |
| /** | |
| * Flexible multiline definition lists with 2 lines of CSS | |
| */ | |
| dt, dd { display: inline; margin: 0; } | |
| dd:after { | |
| content: '\A'; | |
| white-space: pre; | |
| } |
| ## Configure eth0 | |
| # | |
| # vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
| DEVICE="eth0" | |
| NM_CONTROLLED="yes" | |
| ONBOOT=yes | |
| HWADDR=A4:BA:DB:37:F1:04 | |
| TYPE=Ethernet | |
| BOOTPROTO=static |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| /* Centered heading with rules */ | |
| h1 { | |
| position: relative; | |
| overflow: hidden; | |
| white-space: nowrap; | |
| text-align: center; | |
| font: 1.6em/1.1 Georgia; | |
| padding: .2em 0; | |
| text-shadow: 0 1px rgba(255,255,255,.6); |