Skip to content

Instantly share code, notes, and snippets.

View adamgoucher's full-sized avatar

adam goucher adamgoucher

View GitHub Profile
Minutes from the February 13, 2020 Selenium Project Status Meeting
Project Statistics
Open Pull Requests: 120
Open Issues: 486
Governance Proposal
- https://github.com/SeleniumHQ/seleniumhq.github.io/pull/108
- Merge / Close decision postponed until after the next call with SFC to get a their feedback
@adamgoucher
adamgoucher / 02-13-2020 - Agenda
Last active February 13, 2020 15:13
Because I ran out of time to figure out where to put it on the website, here is the proposed agenda for the first bi-weekly selenium project meeting scheduled for 02-13-2020 at 4PM UTC in the #seleniumhq channel of the Selenium Slack (https://seleniumhq.herokuapp.com/)
Bi-weekly Selenium Project Meeting-like-thing (Feb 13, 2020)
============================================================
0. Opening Ceremony
- Rollcall
- Tickets
- Pull Requests
1. Governance
- Do we need to extend the deadline?
- Do the people in the doc listed as committee members accept the [continued] role?

Secure Node Registration

Description

Right now, anyone who knows a Selenium Grid Hub node can register as a Node on it. This is is convenient, but also means a bad actor could register on your Hub and intercept your scripts. In order to counter this the Grid 4.x needs to be able to restrict node registration.

Possible Impementations

@adamgoucher
adamgoucher / structured.diff
Created August 11, 2018 00:30
How to create simple structured logs for your Laravel 5.x app
Adams-MacBook-Pro:tether adamgoucher$ git diff bootstrap/app.php
diff --git a/bootstrap/app.php b/bootstrap/app.php
index 36a1fa6a9..d9958cd28 100755
--- a/bootstrap/app.php
+++ b/bootstrap/app.php
@@ -1,5 +1,8 @@
<?php
+use Monolog\Formatter\JsonFormatter;
+use Monolog\Handler\RotatingFileHandler;
This file has been truncated, but you can view the full file.
$ vagrant up --debug
INFO global: Vagrant version: 1.9.1
INFO global: Ruby version: 2.2.5
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_OLD_ENV_TERM_PROGRAM_VERSION="3.0.13"
INFO global: VAGRANT_OLD_ENV_OLDPWD="/Users/adamgoucher/tmp"
INFO global: VAGRANT_OLD_ENV_LANG="en_CA.UTF-8"
@adamgoucher
adamgoucher / CheckForPassportClient.php
Created January 13, 2017 02:56
We are seeding Laravel Passport personal access tokens for intra-service communication. But, Laravel expects you to login to the box and run an artisan command. Of course, in today's infrastructure-as-code and thou-shalt-not-login-to-a-box approaches to servers creates a bit of a headache. Never fear! A quick artisan command wrapped in a shell s…
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use \Laravel\Passport\Client;
class CheckForPassportClient extends Command
{
/**
@adamgoucher
adamgoucher / Vagrantfile
Last active December 25, 2016 04:51
Vagrantfile for running 3 Laravel projects in an Ubuntu guest. Idea being to have a quick development environment, including getting and updating code in one shot. Onboarding people is hard. It doesn't have to be.
# -*- mode: ruby -*-
# vi: set ft=ruby :
unless Vagrant.has_plugin?("vagrant-hosts")
raise 'vagrant-hosts plugin not installed; https://github.com/oscar-stack/vagrant-hosts'
end
unless Vagrant.has_plugin?("vagrant-puppet-install")
raise 'vagrant-puppet-install plugin not installed; https://github.com/petems/vagrant-puppet-install'
end
@adamgoucher
adamgoucher / app.php
Last active July 28, 2016 22:13
How I would like to see Laravel's languages work.
/*
|--------------------------------------------------------------------------
| Application Locale Heirachy
|--------------------------------------------------------------------------
|
| The locales mapping specifies the heirarchy of locales. This allows for
| client-based as well as regional-based language overrides without having
| to maintain full language files for each one. The fallback_locale remains
| top of heirarchy
|
@adamgoucher
adamgoucher / codedeploy-agent-current.py
Created April 19, 2016 15:50
check whether your hosted version of the codedeploy-agent is the current one or not
import requests
from StringIO import StringIO
import gzip
import re
def get_hosted_version(release):
r = requests.get('http://YOUR_SERVER/dists/%s/main/binary-i386/Packages.gz' % release)
packages = gzip.GzipFile(fileobj=StringIO(r.content))
# break into individual package sections
@adamgoucher
adamgoucher / pending_expiry.py
Created April 11, 2016 14:48
A 'monday morning' script to see if you need to renew some certificates
import boto3
longest = 0;
data = {}
client = boto3.client('iam')
for certificate in client.list_server_certificates()['ServerCertificateMetadataList']:
if len(certificate['ServerCertificateName']) > longest:
longest = len(certificate['ServerCertificateName'])
data[certificate['Expiration']] = {