Skip to content

Instantly share code, notes, and snippets.

View larrycai's full-sized avatar
💭
I may be slow to respond.

Larry Cai larrycai

💭
I may be slow to respond.
View GitHub Profile
@chrisedrego
chrisedrego / mysql-ingress.yaml
Last active October 26, 2020 07:33
Ingress defintion for mysql
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/server-alias: mysql.<YOUR_DOMAIN>.com
labels:
app: mysql
name: mysql
@chrisedrego
chrisedrego / tcp-services.yaml
Created September 18, 2020 19:54
Ingress TCP Configuration for MYSQL
apiVersion: v1
data:
"3306": mysql/mysql-service:3306
kind: ConfigMap
metadata:
name: tcp-services
namespace: ingress-nginx
@alexellis
alexellis / kvm_minikube.md
Last active July 26, 2024 01:47
Run multiple minikube Kubernetes clusters on Ubuntu Linux with KVM

Ramp up your Kubernetes development, CI-tooling or testing workflow by running multiple Kubernetes clusters on Ubuntu Linux with KVM and minikube.

In this tutorial we will combine the popular minikube tool with Linux's Kernel-based Virtual Machine (KVM) support. It is a great way to re-purpose an old machine that you found on eBay or have gathering gust under your desk. An Intel NUC would also make a great host for this tutorial if you want to buy some new hardware. Another popular angle is to use a bare metal host in the cloud and I've provided some details on that below.

We'll set up all the tooling so that you can build one or many single-node Kubernetes clusters and then deploy applications to them such as OpenFaaS using familiar tooling like helm. I'll then show you how to access the Kubernetes clusters from a remote machine such as your laptop.

Pre-reqs

  • This tutorial uses Ubuntu 16.04 as a base installation, but other distributions are supported by KVM. You'll need to find out how to install
@abayer
abayer / Jenkinsfile
Created February 15, 2017 15:17
An example Declarative Pipeline Jenkinsfile for Feb 15 2017 demo
// A Declarative Pipeline is defined within a 'pipeline' block.
pipeline {
// agent defines where the pipeline will run.
agent {
// This also could have been 'agent any' - that has the same meaning.
label ""
// Other possible built-in agent types are 'agent none', for not running the
// top-level on any agent (which results in you needing to specify agents on
// each stage and do explicit checkouts of scm in those stages), 'docker',
@Faheetah
Faheetah / Jenkinsfile.groovy
Last active October 26, 2024 16:38
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@joepadmiraal
joepadmiraal / LICENSE.md
Last active December 21, 2020 16:41
Jenkins build status widget for Dashing

The MIT License (MIT)

Copyright (c) 2014 David Underwood

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@miawgogo
miawgogo / README.md
Last active April 22, 2021 15:10 — forked from roelentless/README.md
Countdown. REVISED EDITION!!!!

Countdown. REVISED EDITION!!!!

This is a fork of ruleb's count down that rended one of the else ifs unreachable in his code. Even though he was notified by menny people he never fixed his code so i took it on to... fix 1 line of code. This Fork may expand if i have the time to re-learn coffie and see if any outher code is broken.

The rest of this readme and the html code and scss is still the orginal by ruleb.

Description

Simple Dashing widget to countdown until a certain moment. Flashes the widget when finished.

@sklise
sklise / description.md
Last active October 28, 2019 16:10
World Clock for Dashing

World Clock

Requirements

This widget requires a library for the timezone manipulation, moment.js and moment-timezone.js and then also build the necessary data at moment-timezone-data

Then in assets/javascripts/application.coffee add the following three lines above #= require_directory .

#= require moment
@kalenwatermeyer
kalenwatermeyer / JenkinsLastCommit.md
Last active July 29, 2019 03:39
Jenkins - Last commit info widget

Jenkins Last Commit - screenshot

Description

The Jenkins Last Commit widget periodically fetches SCM change information from a Jenkins instance for a specified list of jobs.

This allows you to have multiple widgets simultaneously (monitoing separate jobs for changes).

Calls are made to the Jenkins API to retrieve the changeset object in a JSON form. This JSON object contains various pieces of information about the last commit made for the Jenkins job.

@chojayr
chojayr / dashing_zabbix_trigger.md
Last active November 28, 2023 16:39
Dashboard(Dashing) Zabbix Triggers

Dashing dashboard for zabbix trigger

zabbix trigger zabbix trigger

This will provide the total number of alerts on triggers status

  • flash when there's an alert/triggers (color based on the zabbix trigger color format)
  • trigger = Warning, Average, High & Disaster
  • unacknowledge triggers