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 | |
# Install RVM | |
\curl -L https://get.rvm.io | sudo bash -s stable | |
# Add user to a group | |
# Todo: Remove hardcoding | |
sudo usermod -a -G rvm ubuntu | |
# Trying to avoid logout / login part here |
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
diff --git a/sites/all/modules/simpletest/drupal_web_test_case.php b/sites/all/modules/simpletest/drupal_web_test_case.php | |
index 9a9c360..fb67fba 100644 | |
--- a/sites/all/modules/simpletest/drupal_web_test_case.php | |
+++ b/sites/all/modules/simpletest/drupal_web_test_case.php | |
@@ -1310,6 +1310,11 @@ class DrupalWebTestCase extends DrupalTestCase { | |
if (!isset($this->curlHandle)) { | |
$this->curlHandle = curl_init(); | |
+ | |
+ if (empty($this->cookieFile)) { |
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
// Nodejs submodules lazyloading, very useful for private modules repos | |
// where you don't want to create separate repo for evey module | |
// using this snippet, you can create one main repo for private modules | |
// and create submodules inside subfolder with the same name. | |
var fs = require('fs'); | |
exports.answer = 42; // Some existing property | |
// This is how you would do it without lazy loading | |
// basically u would need to require every submodule right away |
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
location ~* ^/internal_redirect/(.*?)/(.*) { | |
internal; | |
# If you use variables in proxy pass you need to | |
# tell nginx how to resolve your host | |
# otherwise you will get 502 errors | |
# you could also use google 8.8.8.8 | |
resolver 172.16.0.23; | |
proxy_buffering 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
- Каждый сценарий должен иметь смысл и выполняться независимо от других сценариев. Это подразумевает что каждый сценарий должен иметь достаточно шагов Given для того чтобы создать необходимый контекст для выполнения теста. | |
- Создатели фич должны иметь возможность описать свои мысли в свободной форме, чтобы фича читалась натурально. Это означает что они могут использовать фразы отличающиеся друг от друга но подразумевающие один результат. Очень важно чтобы фичи не звучали как написанные роботом. | |
- При написании фич, сделайте упор на читабельность, в противном случае они будут выглядеть как программа или тех спецификация и мы хотим избежать этого любой ценой! Ведь если не программист с трудом может понять что происходит в фиче, зачем тогда вообще их писать? ( Ведь ВDD в первую очередь направлен на коммуникацию - если это отбросить то можно вернуть к старым добрым simpletest или codeception ) | |
- Старайтесь избегать технических деталей вроде "чистка очереди", "запуск back-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
server | |
{ | |
listen 80; | |
server_name a.com b.com c.com; | |
location ~* ^/comment/(.*) { | |
proxy_set_header HOST shared.com; | |
# $1 - stores capture from the location on top | |
# $is_args will return ? if there are query params | |
# $args stores query params |
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
1382383761.140 38.96.155.45 - 2013-10-21T19:29:21+00:00 GET /sites/all/modules/admin/includes/admin.toolbar.js?Q HTTP/1.1 200 1616 "http://www.fastcompany.com/account/skhaladzinski" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/28.0.1500.71 Chrome/28.0.1500.71 Safari/537.36" US 0.001 "-" www.fastcompany.com 6dfca709 | |
input { | |
file { | |
'path' => '/path/to/file.log' | |
'type' => 'fcd6_nginx_access' | |
} | |
} |
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
service "opscenter-agent" do | |
supports :status => true | |
start_command "#{agent_dir}/bin/opscenter-agent" | |
status_command "ps aux | grep -q '[o]pscenter-agent'" | |
stop_command "kill $(ps aux | grep '[o]pscenter-agent' | awk '{print $2}')" | |
action :start | |
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
location ~* ^/(assets)/(.*) { | |
set $remote_host "static.fc.com"; | |
# needed to resolve the dynamic host in proxy_pass | |
resolver 172.16.0.23; | |
proxy_set_header HOST $remote_host; | |
proxy_pass http://$remote_host/$1/$2; | |
} |
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
var handleApiRequest = function(req, plugin, next) { | |
validate_path(req.path, function(err) { | |
if (err) { | |
var error = plugin.hapi.error.badRequest(err); | |
next(error); | |
} | |
}); | |
next(); | |
} |
OlderNewer