Skip to content

Instantly share code, notes, and snippets.

@aczietlow
aczietlow / selenium-php-webdriver-cheatsheet.md
Last active March 6, 2024 22:48 — forked from huangzhichong/selenium-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);

@maaarghk
maaarghk / ballache.md
Last active August 22, 2017 23:16
Dual PHP - Run PHP 5.3 using mod_php and PHP 5.6 using php_fpm on Apache 2.2, as distributed by CentOS 6.5. Also tested on CentOS 6.3!

Dual PHP - Apache 2.2 running PHP 5.3 mod_php and PHP 5.6 php_fpm on CentOS 6.5

Introduction

We have a CentOS 6.5 server in production, running sites which are not compatible with PHP 5.4+. For this reason, we are running Apache 2.2 + PHP 5.3 (mod_php). We also run some newer sites on the server and we would like to run them on PHP 5.6 in order to take advantage of the performance improvements which have been realised in the newer versions of PHP. To minimize pain, we will run both versions side by side. This will require mod_php to be overridden in the VirtualHost by mod_fastcgi. We will install PHP 5.6 FPM to achieve this.

This procedure has also been tested and works on an up to date install of CentOS 6.3!

@enisozgen
enisozgen / is_command_exist.yml
Last active May 8, 2024 02:47
ansible tasks that Checks if a program exists from a Bash script
- name: Check is rvm installed
shell: command -v rvm >/dev/null 2>&1
register: is_rvm_exist
ignore_errors: yes
- debug: msg="{{ is_rvm_exist.rc }}" # it returns rc 1
- debug: var=is_rvm_exist
- name: Check is ls installed
shell: command -v ls >/dev/null 2>&1