How to set up a Headless Selenium Testing environment for CentOS 6.3.
Follow these steps to set up a CentOS 6.3 host to run headless Selenium tests with Firefox.
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
### Call the correct front controller. This is dependent on an environment variable being set | |
### in the virtual host configuration. SetEnv seems not to work, so here's an example with SetEnvIfNoCase: | |
### <Directory /path/to/application/web> | |
### SetEnvIfNoCase REQUEST_URI .* SYMFONY_ENV=dev | |
### </Directory> | |
### This will force the following rules to call the dev front controller. |
// License: MIT - https://opensource.org/licenses/MIT | |
// Author: Michele Locati <[email protected]> | |
// Source: https://gist.github.com/mlocati/7210513 | |
function perc2color(perc) { | |
var r, g, b = 0; | |
if(perc < 50) { | |
r = 255; | |
g = Math.round(5.1 * perc); | |
} | |
else { |
#!/bin/bash | |
# include config | |
# config example below: | |
# | |
# | |
# Example deploy_config.sh | |
# | |
# dev_env() { |
From Meteor's documentation:
In Meteor, your server code runs in a single thread per request, not in the asynchronous callback style typical of Node. We find the linear execution model a better fit for the typical server code in a Meteor application.
This guide serves as a mini-tour of tools, trix and patterns that can be used to run async code in Meteor.
Sometimes we need to run async code in Meteor.methods
. For this we create a Future
to block until the async code has finished. This pattern can be seen all over Meteor's own codebase:
find . -type f -exec chmod 644 {} \; | |
find . -type d -exec chmod 755 {} \; | |
chmod 550 pear | |
chmod 550 mage | |
chmod -R 777 media var |
version=1.7.0.2 | |
wget http://www.magentocommerce.com/downloads/assets/$version/magento-$version.tar.gz | |
tar -zxvf magento-$version.tar.gz | |
mv magento/* magento/.htaccess . | |
chmod -R o+w media var | |
chmod o+w app/etc | |
rm -rf magento/ magento-$version.tar.gz | |
rm -rf index.php.sample LICENSE.txt LICENSE.html LICENSE_AFL.txt php.ini.sample RELEASE_NOTES.txt |
<?php | |
use Doctrine\ORM\Query\SqlWalker; | |
/** | |
* Quick hack to allow adding a USE INDEX on the query | |
*/ | |
class UseIndexWalker extends SqlWalker | |
{ | |
const HINT_USE_INDEX = 'UseIndexWalker.UseIndex'; |
#require 'active_support/core_ext' | |
class YamlCompare | |
def self.compare_keys first_file_info, second_file_info, results_location | |
first_file = Hash.new | |
second_file = Hash.new | |
deltas_file = Hash.new | |
File.open( first_file_info[:file_location] ) { |yf| first_file = YAML.load( yf ) } | |
File.open( second_file_info[:file_location] ) { |yf| second_file = YAML.load( yf ) } | |
first_file[first_file_info[:root]].each_pair do |k,v| |
<?php | |
# ------------------------------ | |
# START CONFIGURATION SECTION | |
# | |
$launch_url = "https://lti.tools/test/tp.php"; | |
$key = "12345"; | |
$secret = "secret"; | |
$launch_data = array( |