Skip to content

Instantly share code, notes, and snippets.

View udoyen's full-sized avatar

george udosen udoyen

View GitHub Profile
def GenerateConfig(context):
"""Generate YAML resource configuration."""
cluster_name = context.properties['CLUSTER_NAME']
cluster_region = context.properties['CLUSTER_ZONE']
number_of_nodes = context.properties['NUM_NODES']
resources = []
outputs = []
@udoyen
udoyen / kubernetes_deployment_ingress.py
Created May 14, 2021 07:02 — forked from DazWilkin/kubernetes_deployment_ingress.py
Cloud Deployment Manager & Kubernetes
def GenerateConfig(context):
"""Generate YAML resource configuration."""
cluster_types_root = '{}/kubernetes'.format(context.env['project'])
cluster_types = {
'Service': '{}-v1:/api/v1/namespaces/{{namespace}}/services'.format(cluster_types_root),
'Deployment': '{}-v1beta1-apps:/apis/apps/v1beta1/namespaces/{{namespace}}/deployments'.format(cluster_types_root),
'Ingress': '{}-v1beta1-extensions:/apis/extensions/v1beta1/namespaces/{{namespace}}/ingresses'.format(cluster_types_root),
}
@udoyen
udoyen / git-pushing-multiple.rst
Created May 9, 2021 15:49 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@udoyen
udoyen / !Simple Stackdriver custom metrics
Created April 29, 2021 12:18 — forked from ludoo/!Simple Stackdriver custom metrics
Simple Stackdriver custom metrics
foo! spam! eggs! name this gist!
#!/bin/bash
# start the gcloud command
# change the case of the command option
task=$(echo $1 | tr '[:upper:]' '[:lower:]')
# catch user input and check for validity
if [ $# -ne 2 ]
then
echo " "
@udoyen
udoyen / 51-android.rules
Created September 23, 2020 09:27 — forked from jdamcd/51-android.rules
Full set of Android USB vendor ID rules for Linux
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev" #Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev" #ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666", GROUP="plugdev" #Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666", GROUP="plugdev" #Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", GROUP="plugdev" #Fujitsu
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", GROUP="plugdev" #Fujitsu Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666", GROUP="plugdev" #Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev" #Google
SUBSYSTEM=="usb", ATTR{idVendor}=="201E", MODE="0666", GROUP="plugdev" #Haier
SUBSYSTEM=="usb", ATTR{idVendor}=="109b", MODE="0666", GROUP="plugdev" #Hisense
@udoyen
udoyen / README.md
Created May 28, 2020 18:58 — forked from eruvanos/README.md
Simple mock server for testing using Flask

Mock server for testing using flask

License

MIT

Prepare

Install flask and requests to run this example.

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

Update 7/28/2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

Steps:

  1. Open VirtualBox
  2. Right-click your VM, then click Settings
  3. Go to Shared Folders section

Update 7/28/2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

Steps:

  1. Open VirtualBox
  2. Right-click your VM, then click Settings
  3. Go to Shared Folders section