Skip to content

Instantly share code, notes, and snippets.

View msgongora's full-sized avatar

Marcel Gongora msgongora

View GitHub Profile
@msgongora
msgongora / hosts
Created December 14, 2022 17:08 — forked from consti/hosts
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost

Copyright 2018 Google LLC. SPDX-License-Identifier: Apache-2.0

Authors: ianchak@google.com, mtaufen@google.com silviabear@google.com, fbongiovanni@google.com

Building Kubernetes from Source in Minutes

In this repo you'll find instructions for building kubernetes (k8s) from source in minutes.

You will start a GCP VM, install kubernetes (k8s) build and runtime dependencies, then build k8s from source. Afterward, we'll startup the local build and verify its working.

{
"description" : "",
"name" : "iterm-k8s",
"rules" : [
{
"action" : "allow",
"creationDate" : 1639500971.395139,
"modificationDate" : 1639500971.395139,
"owner" : "me",
"process" : "\/Applications\/iTerm.app\/Contents\/MacOS\/iTerm2",
@msgongora
msgongora / maintenance_exclusion-crash.log
Created January 5, 2021 07:12
maintenance_exclusion bug
2021/01/05 02:09:49 [INFO] Terraform version: 0.13.5
2021/01/05 02:09:49 [INFO] Go runtime version: go1.14.12
2021/01/05 02:09:49 [INFO] CLI args: []string{"/usr/local/bin/terraform-0.13", "apply", "-auto-approve"}
2021/01/05 02:09:49 [DEBUG] Attempting to open CLI config file: /Users/marcel/.terraformrc
2021/01/05 02:09:49 Loading CLI configuration from /Users/marcel/.terraformrc
2021/01/05 02:09:49 [DEBUG] checking for credentials in "/Users/marcel/.terraform.d/plugins"
2021/01/05 02:09:49 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2021/01/05 02:09:49 [DEBUG] will search for provider plugins in /Users/marcel/.terraform.d/plugins
2021/01/05 02:09:49 [DEBUG] ignoring non-existing provider search directory /Users/marcel/Library/Application Support/io.terraform/plugins
2021/01/05 02:09:49 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
@msgongora
msgongora / vscode-expired-certificate.md
Last active June 25, 2020 18:57
VSCode and GIthub PR Extension certificate expired issue
  1. close all your vscode instances
  2. rename the extension folder. This is to match the version change from package.json through the patch. I'm using a bigger number to avoid auto-upgrade from the official extension releases in the mean time this issue get fixed.
mv ~/.vscode/extensions/github.vscode-pull-request-github-0.17.0 \
  ~/.vscode/extensions/github.vscode-pull-request-github-0.40.0
  1. download vscode.diff (unfortunally the patch is to big and it can't be hosted here)
curl -L https://github.com/msgongora/vscode-pull-request-github/raw/hotfix/disableTlsVerification/vscode.diff > /tmp/vscode.diff
@msgongora
msgongora / https-sticky.md
Created November 3, 2017 22:08 — forked from bprashanth/https-sticky.md
https sticky sessions

Create a backend service that simply serves the pod name, and a frontend haproxy instance that balances based on client cookies.

# This is the backend service
apiVersion: v1
kind: Service
metadata:
  name: hostname
  annotations:
    # Enable sticky-ness on "SERVERID"
    serviceloadbalancer/lb.cookie-sticky-session: "true"
@msgongora
msgongora / local-registry.yml
Created October 17, 2017 04:09 — forked from mtpereira/local-registry.yml
Local development with Kubernetes
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-registry-v0
namespace: kube-system
labels:
k8s-app: kube-registry
version: v0
spec:
replicas: 1
@msgongora
msgongora / Ansible Let's Encrypt Nginx setup
Created August 21, 2017 14:16 — forked from mattiaslundberg/Ansible Let's Encrypt Nginx setup
Let's Encrypt Nginx setup with Ansible
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)