Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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}}'
@elsonrodriguez
elsonrodriguez / README.md
Last active March 6, 2020 22:46
How to run Stateful services on GKE

Don't.

Events:
  Type     Reason              Age                       From                                         Message
  ----     ------              ----                      ----                                         -------
  Warning  FailedMount         6m35s (x3278 over 5d3h)   kubelet, gke-cluster-1-pool-1-7f7f8d03-gzgt  Unable to mount volumes for pod "mysql-1-0_default(26843a14-94ff-49dd-90a7-5214f575f70d)": timeout expired waiting for volumes to attach or mount for pod "default"/"mysql-1-0". list of unmounted volumes=[rootfs]. list of unattached volumes=[vls-72d7-mysql-1-vm volumes rootfs lvmdata udevdata cgroups default-token-pr9xg]
  Warning  FailedAttachVolume  3m40s (x1751 over 4d21h)  attachdetach-controller                      AttachVolume.Attach failed for volume "pvc-0885265c-b5c3-4d96-8383-31489181eb01" : attachment timeout for volume simple-pvc-0885265c-b5c3-4d96-8383-31489181eb01
# The following workflow executes a diamond workflow
#
# A
# / \
# B C
# \ /
# D
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BackgroundBlur</key>
<real>0.0</real>
<key>BackgroundColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OV05TV2hpdGVcTlNDb2xvclNwYWNlViRjbGFzc0Iw
### Keybase proof
I hereby claim:
* I am elsonrodriguez on github.
* I am elsonrodriguez (https://keybase.io/elsonrodriguez) on keybase.
* I have a public key ASB4F_3JGBBf3SiMDALLOV3YS9DKJRznk4g55RuzNEocGQo
To claim this, I am signing this object: