Skip to content

Instantly share code, notes, and snippets.

if has('nvim')
tnoremap <Esc> <C-\><C-n>
tnoremap <C-v><Esc> <Esc>
endif
@nelstrom
nelstrom / neovim-remote-editor.sh
Last active May 5, 2017 08:28
Inside Neovim :terminal, use neovim-remote as `$VISUAL`
if [ -n "$NVIM_LISTEN_ADDRESS" ]; then
export VISUAL="nvr -cc split --remote-wait +'set bufhidden=wipe'"
else
export VISUAL="nvim"
fi
@nelstrom
nelstrom / unlist-nvr-buffers.vim
Last active May 4, 2017 08:39
When a temporary buffer that was opened by neovim-remote is closed, automatically unlist it.
if has('nvim')
augroup neovim
autocmd BufWinEnter *
\ if exists('b:nvr')
\| setlocal bufhidden=wipe
\| endif
augroup END
endif
@nelstrom
nelstrom / init.vim
Last active February 22, 2017 18:43
if has('nvim')
autocmd ColorScheme * runtime plugin/terminal_colors.vim
endif
if exists(':terminal')
" Readline cheatsheet:
" ctrl-a - jump to start of line
" ctrl-e - jump to end of line
" ctrl-k - kill forwards to the end of line
" ctrl-u - kill backwards to the start of line
autocmd TermOpen * nnoremap <buffer> I I<C-a>
autocmd TermOpen * nnoremap <buffer> A A<C-e>
autocmd TermOpen * nnoremap <buffer> C A<C-k>
autocmd TermOpen * nnoremap <buffer> D A<C-k><C-\><C-n>
<select>
<option>1</option>
<option selected={{true}}>2</option>
</select>
<select>
<option>1</option>
<option selected>2</option>
</select>
import Ember from 'ember';
export default Ember.Controller.extend({
vehicle: null,
vehicles: ['Tesla', 'Chrysler', 'Toyota'],
actions: {
selectVehicle(vehicle) {
this.set('vehicle', vehicle);
}
}
export default Ember.Service.extend({
// ...
lastOpenField() {
...
},
nextOpenField() {
...
},
4.times do
3.times do
sample :drum_cymbal_pedal
sleep 0.25
end
sleep 0.25
2.times do
sample :drum_cymbal_pedal
sleep 0.25
end

Create an accessible interface for voting on features.

Here's a simple Rails app. It has a basic login system, with 'Like' and 'Unlike' buttons for a list of features.

It should be easy to tell which feature has received the most likes. When a user places a vote, they should be able to tell that their vote has been counted.

Make sure that the interface is easy to use with a mouse, with a keyboard, and using a screenreader.