Skip to content

Instantly share code, notes, and snippets.

View connecticus's full-sized avatar

Ekaterina Belinska connecticus

View GitHub Profile
@connecticus
connecticus / base.conf
Created May 30, 2019 05:11 — forked from nesquena/base.conf
nginx configuration
include mime.types;
default_type application/octet-stream;
access_log logs/access.log;
sendfile on;
keepalive_timeout 65;
tcp_nodelay on;
tcp_nopush on;
Started POST "/admin/products/pech-mangal-vesta/images" for 127.0.0.1 at 2018-10-01 16:30:36 -0700
Processing by Spree::Admin::ImagesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"5JJAWLbpdtKR2Ie88e5HoycxBwtMdrvdoJsxnIwBhz99FExaF8iqp6ejSVFsES5T7nR7yFvBbIQtCNtT/Q2FQg==", "image"=>{"attachment"=>#<ActionDispatch::Http::UploadedFile:0x0000555e7f219b10 @tempfile=#<Tempfile:/tmp/RackMultipart20181001-9688-x2hbk0.jpg>, @original_filename="netty.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"image[attachment]\"; filename=\"netty.jpg\"\r\nContent-Type: image/jpeg\r\n">, "viewable_id"=>{"3"=>["42"]}, "alt"=>"alt"}, "option_types"=>["3"], "button"=>"", "product_id"=>"pech-mangal-vesta"}
Spree::Preference Load (0.8ms) SELECT `spree_preferences`.* FROM `spree_preferences` WHERE `spree_preferences`.`key` = 'spree/backend_configuration/locale' LIMIT 1
↳ /home/stas/.rvm/gems/ruby-2.3.7/bundler/gems/spree-ad5715aad414/core/app/models/spree/preferences/st
@connecticus
connecticus / refinerycms_nginx_proxy_cache
Created June 9, 2016 06:03 — forked from Matho/refinerycms_nginx_proxy_cache
Refinery CMS - Nginx proxy_cache instead of Rack:Cache
Refinery CMS:
Caching images generated by Dragonfly with Nginx cache_proxy instead of Rack:Cache
Before:
Static image served by Nginx: 4409.40 req/sec (mean)
Dragonfly generated images from Rack:Cache: 286.66 req/sec (mean)
After:
Dragonfly generated images from Nginx proxy_cache: 4099 req/sec (mean)
@connecticus
connecticus / installation.sh
Created June 9, 2016 03:44 — forked from mikhailov/installation.sh
nginx+passenger (real production config)
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776
$ cd /usr/src
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
@connecticus
connecticus / google_map_custom_icon.html
Created June 7, 2016 09:58 — forked from vdchristelle/google_map_custom_icon.html
Google map with custom icon + custom balloon Google Maps Custom markers info: https://developers.google.com/maps/tutorials/customizing/custom-markers Google MAPS API: https://developers.google.com/maps/documentation/javascript/reference#InfoWindow -------> ATTENTION: do not put this code in de document load part <---------------
// add this to your html page (e.g. in a block)
<div id="map_canvas">map_canvas</div>
SKU Name Description Available On Price CostPrice shipping_category product_properties Taxons Variants count_on_hand Images
MULTI_001 Demo Product 001 blah blah 2011-02-14 399.99 320.00 heavy test_pp_001 Paintings|WaterColour 12 fixtures/images/DEMO_001_ror_bag.jpeg|fixtures/images/DEMO_003_ror_mug.jpeg