Skip to content

Instantly share code, notes, and snippets.

@elsonrodriguez
elsonrodriguez / README.md
Last active October 17, 2023 14:21
Selenium on Kubernetes!

This is a quick and dirty guide on how to deploy Selenium on Kubernetes.

It is required that you have Kubernetes cluster up and running. If you don't have one, GKE is pretty nifty: https://cloud.google.com/container-engine/

Deploy the Seleniumb Hub:

kubectl create -f selenium-hub-rc.yaml
kubectl create -f selenium-hub-svc.yaml
@elsonrodriguez
elsonrodriguez / gist:80ab3b7cff8b926b2d19
Created March 17, 2016 23:23
kubectl run override
time kubectl run --command --rm -i --tty java --image=java --restart=Never --overrides='{ "apiVersion": "extensions/v1beta1", "spec":{"template":{"spec": {"containers":[{"name":"java","image":"java", "imagePullPolicy":"Always"}]}}}}' -- uptime
@elsonrodriguez
elsonrodriguez / Shopify Simple Theme - collection-template.liquid
Created July 21, 2023 03:48 — forked from mirceapiturca/Shopify Simple Theme - collection-template.liquid
Shopify Simple Theme - collection-template.liquid modified to support alternative images
<!-- /templates/collection.liquid -->
{% paginate collection.products by 12 %}
<div data-section-id="{{ section.id }}" data-section-type="collection-template" data-sort-enabled="{{ section.settings.collection_sort_enable }}" data-tags-enabled="{{ section.settings.collection_tag_enable }}">
<header class="grid">
<h1 class="grid__item small--text-center {% if section.settings.collection_sort_enable or section.settings.collection_tag_enable %}medium-up--one-third{% endif %}">{% if current_tags.size > 0 %}{{ current_tags.first }}{% else %}{{ collection.title }}{% endif %}</h1>
{% if section.settings.collection_sort_enable or section.settings.collection_tag_enable %}
<div class="collection-sorting grid__item medium-up--two-thirds medium-up--text-right small--text-center">
{% if section.settings.collection_tag_enable and collection.all_tags.size > 0 %}
@elsonrodriguez
elsonrodriguez / Shopify Simple Theme - product-grid-item
Created July 21, 2023 03:48 — forked from mirceapiturca/Shopify Simple Theme - product-grid-item
Shopify Simple Theme - product-grid-item.liquid modified to support alternative images
{% unless grid_item_width %}
{% assign grid_item_width = 'medium-up--one-third small--one-half' %}
{% endunless %}
{% unless current_collection == blank %}
{% assign current_collection = collection %}
{% endunless %}
{% assign on_sale = false %}
{% assign sale_text = 'products.product.sale' | t %}
@elsonrodriguez
elsonrodriguez / README.md
Last active June 16, 2023 14:46
Example README.md for a helm Chart.

foo

This chart installs foo, the app with the most bar. This is just a standard foo setup.

Configuration

Secrets

The following secrets are configurable:

@elsonrodriguez
elsonrodriguez / goes16-rtlsdr.md
Created June 8, 2023 05:21 — forked from lxe/goes16-rtlsdr.md
Receive GOES-16 and GOES-17 Images with a Raspberry Pi and RTL-SDR dongle
@elsonrodriguez
elsonrodriguez / convert_brstm_to_mp3.sh
Created November 6, 2022 21:23
A way to convert brstm files to mp3s that iTunes will accept on MacOS, because VLC on Mac does not have batch conversion built in, and my kids need to rock out to Kirby's Epic Yarn or the family will fall apart.
for song in ./*.brstm; do /Applications/VLC.app/Contents/MacOS/VLC "${song}" --sout="#transcode{acodec=mp3,ab=320,samplerate=44100}:standard{access=file,mux=mp3,dst=${song%.brstm}.mp3}" vlc://quit ; done
@elsonrodriguez
elsonrodriguez / README.md
Last active June 3, 2021 09:32
Ceph Ansible Quickstart Guide

Quick and Dirty Ceph Cluster

This is a bare-bones guide on how to setup a Ceph cluster using ceph-ansible

This guide assumes:

  • Ansible is installed on your local machine
  • Eight Centos 7.2 nodes are provisioned and formatted with XFS
  • You have ssh and sudo access to your nodes

Ansible Setup

@elsonrodriguez
elsonrodriguez / gist:0e7b1c62e76f8936b41649499f93fb16
Created February 2, 2021 17:59
test livemigration impact on gke
for node in $(kubectl get pod -l app=foo -o jsonpath='{range .items[*]}{.spec.nodeName}{"\n"}{end}' | sort -n | uniq); do zone=$(kubectl get node $node -o jsonpath="{.items[0]}{.metadata.labels.topology\.kubernetes\.io/zone}"); gcloud compute instances simulate-maintenance-event $node --zone=$zone --async ; done
kubectl get secret bleh -o go-template='{{range $k,$v := .data}}{{printf "%s: " $k}}{{if not $v}}{{$v}}{{else}}{{$v | base64decode}}{{end}}{{"\n"}}{{end}}'