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
| # set path to application | |
| app_dir = File.expand_path("../..", __FILE__) | |
| shared_dir = "#{app_dir}/shared" | |
| working_directory app_dir | |
| # Set unicorn options | |
| worker_processes 2 | |
| preload_app true | |
| timeout 30 |
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
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: unicorn | |
| # Required-Start: $all | |
| # Required-Stop: $all | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: starts the unicorn app server | |
| # Description: starts unicorn using start-stop-daemon |
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
| default: &default | |
| adapter: postgresql | |
| encoding: unicode | |
| username: user | |
| password: password | |
| pool: 5 | |
| development: | |
| <<: *default | |
| database: some_database_development |
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
| class Road < Object | |
| attr_accessor :low_bound, | |
| :high_bound, | |
| :transport_count, | |
| :road_id, | |
| :counter | |
| end | |
| file = File.open('F:/input.txt', 'r') |
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
| context "HAPPY PATHS" do | |
| #... | |
| scenario "create a parking lot and check hints count" do | |
| @tenant.default_location.parking_lots.first.destroy | |
| click_link "Create Parking Lot" | |
| fill_in "Name", with: "Parking Lot 4" | |
| select "Corporate", from: "Workgroup" | |
| click_button "Submit" | |
| success_messages ["Parking Lot successfully created."] | |
| has_no_error_message |
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
| class HTMLFormatter | |
| def output_report(context) | |
| p %Q{ | |
| <html> | |
| <head> | |
| <title>#{context.title}</title> | |
| </head> | |
| <body> | |
| } | |
| context.text.each do |line| |
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
| #!/usr/bin/ruby | |
| def extract_tar_gz (file_path) | |
| if File.exists?(file_path) | |
| system "tar -xvz -C . -f #{file_path}" | |
| end | |
| 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
| listen 443 ssl spdy; | |
| ssl on; | |
| ssl_protocols TLSv1.2 TLSv1.1 TLSv1; | |
| ssl_session_cache shared:SSL:20m; | |
| ssl_session_timeout 10m; | |
| ssl_ciphers 'EECDH+ECDSA+AESGCM:AES128+EECDH:AES128+EDH:!RC4:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!CAMELLIA:!ADH'; | |
| ssl_prefer_server_ciphers on; | |
| resolver 8.8.8.8 8.8.4.4 valid=300s; | |
| resolver_timeout 10s; |
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
| ### Как сделать push в --bare репозиторий | |
| git init | |
| touch .gitignore | |
| git add .gitignore | |
| git commit -m "Initial commit" |
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
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| require 'spreadsheet' | |
| p "Start" | |
| # Write | |
| row_1 = ['A1', 'B1'] | |
| row_2 = ['A2', 'B2'] |