Skip to content

Instantly share code, notes, and snippets.

@gperezmz
gperezmz / keepa-price-history.user.js
Last active December 4, 2024 16:00
UserScript - Loads Keepa price tracker for Amazon domains
// ==UserScript==
// @name Keepa - Price History
// @description Loads Keepa price tracker for Amazon domains
// @version 2.0.1
// @namespace https://gist.github.com/gperezmz
// @match https://www.amazon.*/*/dp/*
// @match https://www.amazon.*/dp/*
// @match https://www.amazon.*/gp/product/*
// @author gperezmz
// @license bsd-3-clause
#!/usr/bin/env bash
set -exu -o pipefail
export CALICO_DATASTORE_TYPE=kubernetes
export CALICO_KUBECONFIG=/etc/rancher/k3s/k3s.yaml
export K8S_SVC_HOST=$(ip a | grep global | grep -v 172 | awk '{print $2}' | cut -f1 -d '/')
export K8S_SVC_PORT=6443
cat <<EOF | kubectl apply -f -
@gperezmz
gperezmz / 00-create-namespace.ps1
Last active January 24, 2021 04:48
flux2 bootstrap cluster
kubectl create ns flux-system
@gperezmz
gperezmz / create-cluster.sh
Last active November 12, 2021 21:41
deploy k3s (without kube-proxy) + cilium with loadbalance.mode hybrid
#!/usr/bin/env bash
set -exu -o pipefail
export MASTER_IP=$(ip a | grep global | awk '{print $2}' | cut -f1 -d '/')
curl -sfL https://get.k3s.io | \
INSTALL_K3S_EXEC="--write-kubeconfig-mode 644 --node-external-ip=${MASTER_IP} --kube-controller-manager-arg=node-cidr-mask-size=16 --kube-controller-manager-arg=address=0.0.0.0 --kube-controller-manager-arg=bind-address=0.0.0.0 --kube-proxy-arg=metrics-bind-address=0.0.0.0 --kube-scheduler-arg=address=0.0.0.0 --kube-scheduler-arg=bind-address=0.0.0.0 --flannel-backend=host-gw --disable=local-storage --disable=metrics-server --disable=servicelb --disable=traefik --disable-cloud-controller --disable-network-policy --kubelet-arg=feature-gates=GracefulNodeShutdown=true --kubelet-arg=feature-gates=MixedProtocolLBService=true" sh -
@gperezmz
gperezmz / flux2.json
Last active May 27, 2021 21:46
scoop manifests
{
"version": "0.14.0",
"description": "Flux is a tool for keeping Kubernetes clusters in sync with sources of configuration (like Git repositories), and automating updates to configuration when there is new code to deploy.",
"homepage": "https://fluxcd.io",
"license": "Apache-2.0",
"architecture": {
"64bit": {
"url": "https://github.com/fluxcd/flux2/releases/download/v0.14.0/flux_0.14.0_windows_amd64.zip",
"hash": "12e7ba775dc0040e6e1f694ea9f93a94ac4913c16bed43ccf141e5a7bad59583"
},
@gperezmz
gperezmz / etc-afp.conf
Created April 13, 2014 08:41
netatalkv3 configuration.
;
; Netatalk 3.x configuration file
;
; hosts allow: the address you put here
; will be the one with
; access.
; Replace any 'path' with your desired
; path and 'myUsername' with yours.
; You could use a group instead, with
; '@myGroup'.
@gperezmz
gperezmz / screenshot.rb
Created April 6, 2014 17:54
OSX – Save screenshots to path and share them with your own domain.
#!/usr/bin/env ruby
require "clipboard"
require "terminal-notifier"
require "net/http"
require "optparse"
require "securerandom"
class Options
def self.parse ( input )