All:
Go/fasthttp (10 thr): 930.0 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
Nginx (10 thr): 826.1 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
cat ~/.ssh/id_rsa.pub | ssh -i [email protected] 'cat >> .ssh/authorized_keys && echo "Key copied"'
| server { | |
| listen 80; | |
| server_name example.com; | |
| location / { | |
| proxy_pass http://localhost:1337; # forward to node app | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection 'upgrade'; | |
| proxy_set_header Host $host; | |
| proxy_cache_bypass $http_upgrade; |
Got some error when install Pillow
ValueError: --enable-jpeg requested but jpeg not found
I giveup for Python 3 then setup again with Python 2 because it need libjpeg-dev
sudo apt-get install libjpeg-dev
bundle exec sidekiq -d -L sidekiq.log -q mailer,5 -q default -e production
| # put this snippet to config/deploy.rb | |
| # then call via Capistrano Rake task | |
| # bundle exec cap staging latest_revision | |
| desc "View latest commit that deploy on server" | |
| task :latest_revision, :roles => :app do | |
| trap("INT") { puts 'Interupted'; exit 0; } | |
| run "cat #{deploy_to}/current/REVISION" do |channel, stream, data| | |
| puts | |
| puts "******* REVISION ********" |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
| # namespace :deploy do | |
| # task :default do | |
| # update | |
| # assets.precompile | |
| # restart | |
| # cleanup | |
| # # etc | |
| # end | |
| # end |
| <?php | |
| // Let say you want to do something with affid in http://mysite.com/about/?affid=1234 | |
| add_action('init', 'affiliate_redirect'); | |
| function affiliate_redirect() { | |
| $varname = 'aff_id'; | |
| $weeks = '4'; | |
| if( isset($_GET[$varname]) && '' != $_GET[$varname] ) { | |
| setcookie('wp_affiliate', $_GET[$varname], time()+648000*$weeks, '/'); |