loop
for i in {1..10} ; do <something command> ; done
| ``` | |
| ## uninstall | |
| brew uninstall --force postgresql | |
| rm -rf /usr/local/var/postgres | |
| ## install | |
| brew install postgresql | |
| ## log | |
| tail -f /usr/local/var/log/postgres.log |
| ``` | |
| it '特定メソッドのパラメータ検証' do | |
| allow(TestCaller).to receive(:test_func) do |tenant, setting| | |
| expect(tenant).to eq 'test' | |
| expect(setting.id).to eq 111 | |
| end | |
| worker = described_class.new | |
| worker.perform(tenant1.name) |
| 方法 |
loop
for i in {1..10} ; do <something command> ; done
| ```js | |
| const { items: stateItems } = state; | |
| console.log(+'1') // -> 1 | |
| ``` |
| ## Memory leaks check | |
| ``` | |
| require 'objspace' | |
| puts "Before: #{ObjectSpace.memsize_of_all * 0.001 * 0.001} MB" | |
| puts "After: #{ObjectSpace.memsize_of_all * 0.001 * 0.001} MB" | |
| ``` | |
| ## Active Record |
| ## hash rename | |
| ``` | |
| data = { name: 'name' } | |
| data["rename"] = data.delete("name") | |
| ``` |
| <!doctype html> | |
| <html lang="ja"> | |
| <head> | |
| <style type="text/css"> | |
| body { | |
| height: 200vh; | |
| } | |
| .way-point { | |
| content: ''; | |
| display: block; |