-
Open a browser
# start an instance of firefox with selenium-webdriver driver = Selenium::WebDriver.for :firefox # :chrome -> chrome # :ie -> iexplore
#!/usr/bin/env ruby | |
# Ruby code snippets to determine MacOS versioning with more to come | |
# Inspired by AJ Acevedo's Gist: https://gist.github.com/AJ-Acevedo/5421660 | |
############################################################## | |
# RbConfig to determine host OS and exit if not mac or linux # | |
############################################################## |

-- Step 6 | |
create view category_aggregate (category, total_places, total_chairs) as | |
select | |
category, | |
count(cafe), | |
sum(number_of_chairs) | |
from street_cafes group by category; |
require "selenium-webdriver" | |
driver = Selenium::WebDriver.for :chrome | |
wait = Selenium::WebDriver::Wait.new(:timeout => 18) | |
driver.navigate.to "https://someloginsite.web" | |
sleep 2 | |
element = driver.find_element(:class, "username") | |
element.send_keys "[email protected]" | |
pwd = driver.find_element(:class, "password") | |
pwd.send_keys "MyPasswords" |
require "selenium-webdriver" | |
# Not quite sure where Selenium think the Firefox binary is by default | |
driver = Selenium::WebDriver.for :firefox | |
driver.navigate.to "http://duckduckgo.com" | |
element = driver.find_element(name: 'q') | |
element.send_keys "Selenium Firefox Ruby Bindings" | |
element.submit |
function clean_up_docker { | |
echo "Stopping all running containers" | |
docker stop $(docker ps -aq) | |
echo "Removing all containers" | |
docker rm $(docker ps -aq) | |
echo "Remove all images" | |
docker rmi $(docker images -q) | |
echo "Doesn't that feel better?! Have a lovely day" | |
} |
#!/bin/bash | |
# Define the network service. Replace "Wi-Fi" with your actual network service name, e.g., "Ethernet", if needed. | |
NETWORK_SERVICE="Wi-Fi" | |
# Safe DNS list | |
GOOGLE_DNS="8.8.8.8" | |
GOOGLE_DNS_ALT="8.8.4.4" | |
CLOUDFLARE_DNS="1.1.1.1" | |
CLOUDFLARE_DNS_ALT="1.0.0.1" |
#!/bin/bash | |
# Set the namespace variable | |
namespace="tools" | |
# Get the list of pods | |
pods=$(kubectl get pods -n "${namespace}" -o custom-columns=:metadata.name | grep "redis-cluster") | |
# Check if we got the pods | |
if [ -z "$pods" ]; then |
What the French toast is a runbook? A good runbook is a comprehensive, clear, and actionable guide that enables IT and operations teams to manage and troubleshoot systems efficiently. It serves as a critical resource for both experienced professionals and those new to a system, ensuring consistent and effective handling of routine tasks, incidents, and procedures. Here are the key characteristics that make a runbook effective:
A runbook must provide step-by-step instructions that are straightforward and easy to follow. Each step should build towards achieving a specific outcome, with unnecessary details omitted to keep the document concise and focused on the task at hand[1][6][8].
The runbook should be easily accessible to all relevant team members. This includes being stored in a location that team members are aware of and can easily retrieve when needed. The runbook should support alerts and be searchable, with metadata such as type, creation