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.
| server { | |
| listen 80; | |
| server_name site.dev; | |
| index index.php; | |
| root /Users/balkon_smoke/Sites/site.dev/web; | |
| error_log /Users/balkon_smoke/Sites/site.dev/logs/error.log; | |
| access_log /Users/balkon_smoke/Sites/site.dev/logs/access.log; | |
| location / { |
| <?php | |
| /* | |
| Made by Kudusch (blog.kudusch.de, kudusch.de, @Kudusch) | |
| --------- | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> |
| #!/usr/bin/env python | |
| # | |
| # Extracts email addresses from one or more plain text files. | |
| # | |
| # Notes: | |
| # - Does not save to file (pipe the output to a file if you want it saved). | |
| # - Does not check for duplicates (which can easily be done in the terminal). | |
| # | |
| # (c) 2013 Dennis Ideler <ideler.dennis@gmail.com> |
| # download latest libevent2 and tmux sources, and extract them somewhere | |
| # (thx bluejedi for tip on latest tmux URL) | |
| # | |
| # at the time of writing: | |
| # https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
| # http://sourceforge.net/projects/tmux/files/latest/download?source=files | |
| # | |
| # install deps | |
| yum install gcc kernel-devel make ncurses-devel |
I was looking for a way to load certain files using regular PHP and mix and match HHVM with PHP-FPM. Here is an example of how to use PHP-FPM to process files in the /exclude/ directory and HHVM for all other files.
## Use regular ol' PHP for files in this directory
location ^~ /exclude/ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
break;| /************************************************ | |
| FILENAME | |
| server_querystring.js | |
| DESCRIPTION | |
| creates a web server that | |
| display "Hello Dynamic World Wide Web" | |
| it includes a web form to accept a new name from the user via the querystring and displays it. | |
| the new name will be stored in a local variable 'defaultName'. |
| <?php | |
| function cleanse($string, $allowedTags = array()) | |
| { | |
| if (get_magic_quotes_gpc()) { | |
| $string = stripslashes($stringIn); | |
| } | |
| // $string = kses($string, $allowedTags); // For kses {@see http://sourceforge.net/projects/kses/} | |
| // ============ |
#Drupal & Apache Solr Integration
This is a cheat sheet and rough guide to the integration of Drupal and Apache Solr. It will contain useful functions and how to combine them, a basic layout on how the components fit together, and some DOs and DON'Ts. All of this is based on the apachesolr integration, if you're using a different module then this will probably be of no use to you.
Within the Apache Solr module there is support for connecting to multiple Solr instances, each the configured connections is considered an environment within the context of the Solr modules operations. When you're interacting with Solr and there is only one connection configured then you mostly do not have to be concerned with this as the module will load the default environment by itself. However you should always try to ensure that anything you construct around Solr is designed to handle the existence of multiple environments.
| <?php | |
| // ------------------------------------------------------------------------- | |
| // | |
| // Taken from: | |
| // http://worldofdrupal.blogspot.com.ar/2014/01/drupal-7-apache-solr-custom-query.html | |
| // | |
| // ------------------------------------------------------------------------- | |
| // Search parameters |