(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
Spree::CheckoutController.class_eval do | |
def update_with_marketplace_sync | |
if @order.completed? | |
# Тут используешь @order или @current_order пока он ещё не обнулён и всё другое | |
end | |
update_without_marketplace_sync | |
end | |
alias_method_chain :update, :marketplace_sync |
#!/bin/sh | |
HOST='api.*****.com' | |
USER='[email protected]' | |
PASSWORD='password' | |
CLIENT_ID='web' | |
ACCESS_TOKEN=$(curl -s -X POST --data "grant_type=password&username=$USER&password=$PASSWORD" http://$HOST/api/oauth/token | jq -r '.access_token') | |
echo "Access Token: $ACCESS_TOKEN" |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
If the namespace is not used then the commands will perform on top of the default database.
bundle exec rake db:create
bundle exec rake db:migrate
By using the namespace we are going to use all the configuration for our alternate DB.
bundle exec rake store:db:create
bundle exec rake store:db:migrate