Skip to content

Instantly share code, notes, and snippets.

/**
* IMPORTANT: This file only contains theme JSS of the Publisher app, Don't add other configuration parameters here.
* This theme file is an extension of material-ui default theme https://material-ui.com/customization/default-theme/
* Application related configurations are located in `<PUBLISHER_ROOT>site/public/theme/settings.js`
*/
const userThemes = {
light(theme) {
return (
{
overrides: {
@oahayder
oahayder / envoyfilter.yaml
Last active March 15, 2021 06:46
Istio Gateway EnvoyFilter
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: edge-lua-filter
spec:
workloadLabels:
app: ingressgateway
filters:
- listenerMatch:
portNumber: 443
@docwhat
docwhat / Jenkinsfile
Last active December 16, 2023 13:53
Example pipeline usage of the Jenkins Mask Passwords plugin
// Requires https://plugins.jenkins.io/mask-passwords to run
/**
* Runs code with secret environment variables and hides the values.
*
* @param varAndPasswordList - A list of Maps with a 'var' and 'password' key. Example: `[[var: 'TOKEN', password: 'sekret']]`
* @param Closure - The code to run in
* @return {void}
*/
def withSecretEnv(List<Map> varAndPasswordList, Closure closure) {
@sasjo
sasjo / drain_jenkins.groovy
Last active October 31, 2024 08:21
Drain Jenkins build queue and stop all running jobs
Jenkins.instance.queue.items.findAll { !it.task.name.contains("Extenda") }.each {
println "Cancel ${it.task.name}"
Jenkins.instance.queue.cancel(it.task)
}
Jenkins.instance.items.each {
stopJobs(it)
}
def stopJobs(job) {
if (job in jenkins.branch.OrganizationFolder) {
// Git behaves well so no need to traverse it.
@bwhaley
bwhaley / cassandra-rolling-restart.yml
Created October 30, 2017 22:33
Ansible playbook for graceful rolling restart of the nodes in a cassandra cluster
- hosts: "*"
become: True
serial: 1
tasks:
- name: Initiate graceful shutdown
shell: "nodetool {{item}} && sleep 5"
with_items:
- disablethrift
- disablebinary
- disablegossip