This file contains 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
## | |
# Finds a element with the id flash-#{name} | |
# | |
# Then I should receive flash success; if an element with id flash-success is displayed it passses. | |
## | |
Then /^I should receive flash (.*)$/ do |name| | |
within("[id=flash-#{name}]"){} | |
end |
This file contains 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
./configure --with-cpu-opt=amd64 \ | |
--prefix=$PREFIX/nginx \ | |
--user=www-data --group=www-data \ | |
--http-log-path=/var/log/nginx/access.log \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--pid-path=/var/run/nginx.pid \ | |
--lock-path=/var/lock/nginx.lock \ | |
--http-client-body-temp-path=/var/tmp/nginx/body \ | |
--http-proxy-temp-path=/var/tmp/nginx/proxy \ | |
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \ |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'> | |
<title>Nginx | CloudsAlot</title> | |
</head> | |
<body> | |
<h1>CloudsAlot @ <a href='https://github.com/RobertBrewitz/CloudsAlot' target='_blank'>Github</a></h1> | |
<p>Nginx was successfully installed and configured.</p> | |
<p>Lorem ipsum dolor sit ameti, consectetur elit. Proin bibendum velit lacus. Suspendisse at metus leo, vel pretium dolor. Donec dignissim accumsan augue, vel dictum elit placerat ac. Fusce non ligula est. In tempor cursus imperdiet. Nunc ornare, enim at elementum hendrerit, lectus enim volutpat diam, at ornare enim ante sed odio. Fusce ac mauris et diam pharetra tincidunt. In placerat quam quis elit facilisis ut consectetur purus mattis. Nullam vulputate auctor sem, quis ultrices risus ultrices molestie. Maecenas eu urna vitae massa aliquam egestas a ut nibh. Maecenas lacinia aliquam ullamcorper. Integer bibendum suscipit fringilla. Donec mattis turpis eu nunc laoreet vitae scelerisque neque bla |
This file contains 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
user www-data www-data; | |
pid /var/run/nginx.pid; | |
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
server_tokens off; |
This file contains 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 worker with 8 concurrent connections | |
autobench --single_host --host1 10.235.50.10 --uri1 /10kb.html --quiet \ | |
--low_rate 8 --high_rate 8 --rate_step 8 --num_call 16 \ | |
--const_test_time 60 --timeout 5 --file 8con_16req_1worker.csv | |
CPU: ~6%, response time: 1.9ms, timeouts: 0 | |
1 worker with 16 concurrent connections | |
autobench --single_host --host1 10.235.50.10 --uri1 /10kb.html --quiet \ | |
--low_rate 16 --high_rate 16 --rate_step 16 --num_call 16 \ | |
--const_test_time 60 --timeout 5 --file 16con_16req_1worker.csv |
This file contains 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
./configure --with-cpu-opt=amd64 \ | |
--prefix=$PREFIX/nginx \ | |
--user=www-data --group=www-data \ | |
--http-log-path=/var/log/nginx/access.log \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--pid-path=/var/run/nginx.pid \ | |
--lock-path=/var/lock/nginx.lock \ | |
--http-client-body-temp-path=/var/tmp/nginx/body \ | |
--http-proxy-temp-path=/var/tmp/nginx/proxy \ | |
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \ |
This file contains 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
user www-data www-data; | |
pid /var/run/nginx.pid; | |
worker_rlimit_nofile 58064; | |
worker_processes 1; | |
events { | |
use epoll; | |
worker_connections 58064; | |
} |
This file contains 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/bash | |
WEEK=$(/bin/date +%V) | |
if [ ! -d $HOME/Downloads/week-$WEEK ]; then | |
mkdir $HOME/Downloads/week-$WEEK | |
fi | |
downloadedFiles=($(find $HOME/Downloads -depth 1)) |
This file contains 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
## | |
# Growing Object Oriented Software | |
# Tell, don't ask approach | |
# Tested and learned the principle | |
class SomeProgram | |
def self.runit | |
# Printer is the main purpose | |
# Later I might want to Log, IM, Email or Ping something about the printing result. |
This file contains 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
When /^I fill in all required "(.*?)" fields$/ do |model| | |
klass = model.singularize.camelcase.constantize | |
# Build the class with valid attributes | |
# Requires valid factory | |
valid_model = FactoryGirl.build(model.singularize.to_sym) | |
# Remove ID field(s) | |
valid_model.attributes.delete("_id") if valid_model.attributes.include?("_id") | |
valid_model.attributes.delete("id") if valid_model.attributes.include?("id") |
OlderNewer