Skip to content

Instantly share code, notes, and snippets.

View rightsaidjames's full-sized avatar

James Sheasby Thomas rightsaidjames

View GitHub Profile
@rightsaidjames
rightsaidjames / commands.js
Created July 10, 2023 11:15
Launch Darkly Cypress Custom Command
Cypress.Commands.add('checkFlag', key => {
const env = Cypress.env('launchDarklyEnvironment')
const projKey = 'default'
cy.fixture('auth').then(auth => {
const accessToken = auth.launchDarklyAccessToken
cy.request({
method: 'GET',
url: `https://app.launchdarkly.com/api/v2/flags/${projKey}/${key}`,
headers: {
@rightsaidjames
rightsaidjames / README.md
Created June 1, 2023 12:00
Example docker-compose file for datarhei/restreamer app
@rightsaidjames
rightsaidjames / kubehelper.sh
Last active October 7, 2021 14:03
Kubernetes Helper Script - Quickly bash into any environment without having to copy-and-paste namespace names or pod names.
#!/bin/bash
# Created by the award-winning Rick Peacock, genericised and extended by James Sheasby Thomas.
#!Usage: ''$ ./kubehelper.sh' then follow prompts.
#! Ensure you have a context set, or hardcode '--context=[yourcontext]' into the kubectl commands in this script.
set -e -o pipefail
@rightsaidjames
rightsaidjames / barebones.html
Last active September 22, 2016 13:05
Barebones HTML demo - styling the body without a <body> tag
<!DOCTYPE html>
<title>Barebones HTML Test</title>
<link rel="stylesheet" type="text/css" href="style.css">
<p>If you can see this as white text on a black background, then your browser can successfully parse HTML documents without <em>html</em>, <em>head</em> or <em>body</em> tags, and can apply basic styles to a <em>body</em> tag that doesn't actually exist in the source code.</p>
@rightsaidjames
rightsaidjames / MPCV-sample-message
Created March 26, 2015 14:34
Example MPCV message
This is a sample message to Prospective Parliamentary Candidates to encourage them to post their CVs on the [Democracy Club website](http://cv.democracyclub.org.uk/). More details about this project here: https://github.com/frabcus/mpcv
I'm writing to you as a potential constituent living in [borough], [town]. I've not yet decided how I will vote this May, and I'd like to have all the information I can about you, your party and what you stand for. With this in mind, would you consider uploading your CV to the Democracy Club website?
Democracy Club are a volunteer group who are collecting the CV of every
candidate for Parliament. There are currently no candidates in [constituency] who have done so, but so far there are CVs for almost 250 PPCs across the country (about 6% of the total pool). CVs are a good way of learning more about the skills and background of job candidates, so why shouldn't politicians share their backgrounds in the same way? And, in light of the recent second job scandals, I'll hope you

HTML5 input [type='number'] demo

A demonstration of the error handling functionality of the [input type='number'] HTML5 element. In modern browsers non-numeric input will be stripped out.

A Pen by James Thomas on CodePen.

License.