Skip to content

Instantly share code, notes, and snippets.

View hguerrero's full-sized avatar

Hugo Guerrero hguerrero

View GitHub Profile
@hguerrero
hguerrero / readme.md
Created October 29, 2021 15:52 — forked from guillaumerose/readme.md
Microshift with podman machine

5 minutes to OpenShift on a Mac with podman machine and microshift.

Steps:

  1. brew install podman
  2. podman machine init
  3. podman machine start
  4. podman machine ssh

(in the ssh session)

@hguerrero
hguerrero / kind-with-local-registry-and-ingress.sh
Last active July 19, 2021 22:03 — forked from orpiske/kind-with-local-registry.sh
Kind with local registry (with registry address fixes)
#!/bin/sh
set -o errexit
####
## Kind cluster with local registry (fixed script from the upstream kind). See NOTE comments below for the changed items
# create registry container unless it already exists
reg_name='kind-registry'
reg_port='5000'
running="$(docker inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)"
kind: Template
apiVersion: template.openshift.io/v1
metadata:
annotations:
description: The Gogs git server (https://gogs.io/)
tags: instant-app,gogs,go,golang
name: gogs
objects:
- kind: ServiceAccount
apiVersion: v1
1. Resume database tier pods

for x in backend-redis system-memcache system-mysql system-redis zync-database; do echo Resuming dc:  $x; sleep 2; oc rollout resume dc/$x; done

Verify all pods are running

oc get pods
NAME                      READY     STATUS    RESTARTS   AGE
backend-redis-1-q2hnc     1/1       Running   0          53s

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories

@hguerrero
hguerrero / formScriptREST.txt
Created March 27, 2017 16:55 — forked from ibek/formScriptREST.txt
Google Forms Apps Script to do REST request
function startProcess(e) {
var formResponse = e.response;
var itemResponses = formResponse.getItemResponses();
var data = {};
for (var j = 0; j < itemResponses.length; j++) {
var itemResponse = itemResponses[j];
var title = itemResponse.getItem().getTitle();
data[title] = itemResponse.getResponse();
}
var options = {