This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //= require 'modules/cart' | |
| //= require 'modules/variant' | |
| //= require 'modules/quantity_spinner' | |
| $('.catalog_i').on('mouseleave mouseout', function(){ | |
| }); | |
| $(function () { | |
| var basket = new Cart(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (1...10) | |
| to a | |
| [*1...10] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def fib(n) | |
| (2..n).inject([0, 1]) { |seq| seq << seq.last(2).inject(:+) }.slice(0, n) | |
| end | |
| def fib1(n, s = [0, 1]) | |
| for i in 2..n | |
| s[i] = s[i - 1] + s[i - 2] | |
| end | |
| s.slice(0, n) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream unicorn { | |
| server unix:/home/deploy/cs/shared/unicorn.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /home/deploy/cs/current/public; | |
| location ^~ /assets/ { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def fib(n) | |
| (2..n).inject( [0, 1] ) { |fib| fib << fib.last(2).reduce(:+) }[n] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| description "Sidekiq Background Worker" | |
| start on runlevel [2345] | |
| stop on runlevel [06] | |
| respawn | |
| respawn limit 3 30 | |
| normal exit 0 TERM | |
| #reload signal USR1 | |
| kill timeout 15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| description "Puma Background Worker" | |
| start on runlevel [2345] | |
| stop on runlevel [06] | |
| respawn | |
| respawn limit 3 30 | |
| setuid j3ck | |
| setgid j3ck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd / | |
| for i in $( ls ); do | |
| sudo du -sh $i | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| json ~1.7 - gem install bundler -v '= 1.5.1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /lib/systemd/system/nginx.service | |
| [Unit] | |
| Description=The NGINX HTTP and reverse proxy server | |
| After=syslog.target network.target remote-fs.target nss-lookup.target | |
| [Service] | |
| Type=forking | |
| PIDFile=/opt/nginx/logs/nginx.pid | |
| ExecStartPre=/opt/nginx/sbin/nginx -t |