-
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);
| 'use strict'; | |
| /** | |
| * Person class. | |
| * | |
| * @constructor | |
| * @param {String} name - name of a person. | |
| * @param {Number} age - age of a person. | |
| * @param {String} gender - gender of a person. | |
| */ |
| <?php | |
| // Only run the code if we are in the admin | |
| if ( is_admin() ) : | |
| class WordPressdeleteMissingImages { | |
| // Action/Filter Hooks | |
| function __construct() { | |
| add_action( 'admin_menu', array( &$this, 'add_page' ) ); |
Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.
nginx -V for the following:
...
TLS SNI support enabled| --- | |
| # This has been tested with ansible 1.3 with these commands: | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts" | |
| # NB: The type of the variable is crucial! | |
| - name: Ansible Conditionals Examples | |
| hosts: $hosts | |
| vars_files: |
| - name: Testing variables with SUDO=NO | |
| hosts: "*" | |
| become: no | |
| tasks: | |
| - name: "PLAYBOOK SUDO=NO, TASK SUDO=NO" | |
| command: whoami | |
| register: whoami_output | |
| become: no | |
| - debug: var=whoami_output.stdout |
| ### WAN backup routing via LTE ### | |
| # A Linux device, such as PC Engines APU, can be equipped with an LTE modem, but | |
| # sometimes it's desirable to use the mobile connection only if the wired | |
| # connection is unavailable. | |
| # The following scenario is for Debian 9 on an APU box, but it's also | |
| # applicable to any other Linux device. | |
| # The DHCP client is tweaked to ignore the DNS server addresses that are |
| #!/usr/bin/env python | |
| # | |
| # Writes task start/stop times to a timelog formatted file. | |
| # You might need to adjust LEDGERFILE, or set the TIMELOG environment variable. | |
| # | |
| # Example reports, after using start/stop on a task: | |
| # ledger -f /path/to/timelog.ledger print | |
| # ledger -f /path/to/timelog.ledger register | |
| # | |
| # Projects, tags, and UUIDs are fully supported and queryable from ledger. |
Thanks to this article by Christoph Berg
Directories and files
~/| # | |
| # Extract files from Bare git-annex repositories without git-annex | |
| # Supports version v6 | |
| # | |
| # See internals: http://git-annex.branchable.com/internals/ | |
| # | |
| # Modified: added non-bare repos, added tar file (of symlinks) output for use with archivemount | |
| # | |
| # TODO: improve output | |
| # TODO: use cat-files instead of archive |