recentpopularlog in

kme : keys   12

SyntaxError: missing : after property id - JavaScript | MDN
ES6 only, FYI.
If you create a property key from an expression, you need to use square brackets. Otherwise the property name can't be computed:
<code class="language-javascript">var obj = { 'b'+'ar': 'foo' };
// SyntaxError: missing : after property id</code>

Put the expression in brackets []:
<code class="language-javascript">var obj = { ['b'+'ar']: 'foo' };</code>
javascript  objects  keys  syntax  errormessage  solution  webdevel  til  es6 
8 weeks ago by kme
vim - How do I toggle between a Vertical and a Horizontal split in vimdiff? - Stack Overflow [http://stackoverflow.com/]
diffopt vertical

The following command will change a vertical split into a horizontal split:

ctrl+w then J

To change back to a vertical split use either:

ctrl+w H or ctrl+w L

For more information about moving windows:

:h window-moving
:h ctrl-w_J
:h ctrl-w_K
:h ctrl-w_H
:h ctrl-w_L
vim  splits  vimdiff  tipsandtricks  windowmanagement  keys 
july 2014 by kme
Bash associative array examples – Andy Balaam's Blog
<code class="language-bash">
$ echo ${MYMAP[$K]} # Use a variable as key to extract a value from an associative array</code>

<code class="language-bash">$ # Loop through all keys in an associative array
$ for K in "${!MYMAP[@]}"; do echo $K; done
foo a
baz b</code>

<code class="language-bash">$ # Looping through keys and values in an associative array
$ for K in "${!MYMAP[@]}"; do echo $K --- ${MYMAP[$K]}; done
foo a --- bar
baz b --- quux

$ # Loop through all values in an associative array
$ for V in "${MYMAP[@]}"; do echo $V; done
bar
quux</code>
bash  scripting  programming  associativearray  solution  array  keys  syntax  iterating 
december 2013 by kme
Improving the security of your SSH private key files — Martin Kleppmann’s blog

olalonde • 3 days ago −
You can also prefix the command by a space in bash and it won't be saved to history.
6 •Reply•Share ›

phil olalonde • 3 days ago −
I believe this only works if you have
$ export HISTIGNORE=' *'

or add the above line to bash_profile

Ralph Ubertang Ellipsis • 4 days ago −
or just read it in as a var then unset it.
•Reply•Share ›
bestpractices  crypto  keys  security  ssh  bash  tipsandtricks  histfile  cya  essential  movein 
may 2013 by kme
Sublime Text 2 - Useful Shortcuts
Select some text then hit:

⌃⇧W

...and begin typing. It will wrap the selected text in the HTML tag you are typing.
sublimetext  textprocessing  editor  crossplatform  hotkeys  reference  cheatsheet  keys  shortcut 
march 2013 by kme
osx - What are some useful TextMate shortcuts? - Stack Overflow
⌃⇧L (that's ctrl+shift+L): Which wraps the currently selected text with a link to whatever's in the clipboard, and works for every text language I've tried it in.
mac  osx  textprocessing  editor  textmate  hotkeys  tipsandtricks  keys  shortcut 
march 2013 by kme
Aero Snap effect for Metacity | The Binary Idiot
gconftool-2 --type string --set /apps/metacity/global_keybindings/run_command_1 "<Super>Left"
gconftool-2 --type string --set /apps/metacity/keybinding_commands/command_1 "wmctrl -r :ACTIVE: -e 0,0,0,`xwininfo -root | grep Width | awk '{ print (($2/2)-6)}'`,`xwininfo -root | grep Height | awk '{ print $2 }'`"

gconftool-2 --type string --set /apps/metacity/global_keybindings/run_command_2 "<Super>Right"
gconftool-2 --type string --set /apps/metacity/keybinding_commands/command_2 "wmctrl -r :ACTIVE: -e 0,`xwininfo -root | grep Width | awk '{ print (($2/2)+5) ",0," (($2/2)-6) }'`,`xwininfo -root | grep Height | awk '{ print $2 }'`"

# If you want to add a couple more Windows 7 style keyboard shortcuts, feel free to pick from this list:
gconftool-2 --type string --set /apps/metacity/window_keybindings/minimize "<Super>Down"
gconftool-2 --type string --set /apps/metacity/window_keybindings/toggle_maximized "<Super>Up"
gconftool-2 --type string --set /apps/metacity/global_keybindings/show_desktop "<Super>D"
gconftool-2 --type string --set /apps/metacity/global_keybindings/run_command_terminal "<Super>T"
gconftool-2 --type string --set /apps/gnome_settings_daemon/keybindings/home "<Mod4>e"
metacity  aerosnap  windowmanagement  shortcutkey  x11  tipsandtricks  essential  solution  keys  hotkeys  shortcut 
february 2013 by kme

Copy this bookmark:





to read