Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat
Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.
Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat
Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.
import { mountWithIntl } from 'helpers/intl-enzyme-test-helper.js'; | |
const wrapper = mountWithIntl( | |
<CustomComponent /> | |
); | |
expect(wrapper.state('foo')).to.equal('bar'); // OK | |
expect(wrapper.text()).to.equal('Hello World!'); // OK |
require 'benchmark' | |
def benchmark | |
time_in_seconds = Benchmark.realtime { yield } | |
time_in_milliseconds(time_in_seconds) | |
end | |
def time_in_milliseconds(time_in_seconds) | |
(time_in_seconds * 1000).round(2).to_s + ' ms' | |
end |
require 'benchmark' | |
def benchmark | |
time_in_seconds = Benchmark.realtime { yield } | |
time_in_milliseconds(time_in_seconds) | |
end | |
def time_in_milliseconds(time_in_seconds) | |
(time_in_seconds * 1000).to_s + ' ms' | |
end |
" Add this to your .vimrc | |
if isdirectory(argv(0)) | |
bd | |
autocmd vimenter * exe "cd" argv(0) | |
autocmd VimEnter * NERDTree | |
endif |
let NERDTreeIgnore=['\.pyc$', '\.pyo$', '\.rbc$', '\.rbo$', '\.class$', '\.o$', '\~$'] | |
" Default mapping, <leader>n | |
call janus#add_mapping('nerdtree', 'map', '<leader>n', ':NERDTreeToggle<CR> :NERDTreeMirror<CR>') | |
augroup AuNERDTreeCmd | |
autocmd AuNERDTreeCmd VimEnter * call s:CdIfDirectory(expand("<amatch>")) | |
autocmd AuNERDTreeCmd FocusGained * call s:UpdateNERDTree() | |
" If the parameter is a directory, cd into it |
/* | |
On OS X, basic text manipulations (left, right, command+left, etc) make use of the system key bindings, | |
and don't need to be repeated here. Anything listed here will take precedence, however. | |
*/ | |
[ | |
{ "keys": ["super+shift+n"], "command": "new_window" }, | |
{ "keys": ["super+shift+w"], "command": "close_window" }, | |
{ "keys": ["super+o"], "command": "prompt_open" }, | |
{ "keys": ["super+shift+t"], "command": "reopen_last_file" }, | |
{ "keys": ["super+alt+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]} }, |
When I call update_attributes on an instance, the database record is updated, but the instance does not have the updated information. | |
The answer is here: | |
http://stackoverflow.com/questions/6289531/rails-3-ar-save-and-update-methods-do-not-save-attributes-changed-in-database-b | |