Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -ex
if [ $# -ne 3 ]; then
echo usage: $0 jenkins_home git_repos_url backup_folder
exit 1
fi
# Jenkins home folder
@gchamon
gchamon / backend.py
Last active June 2, 2023 20:15
Gists with functional code from papyrus article about OIDC, JWT and Python
from flask import Flask
from uuid import uuid4
app = Flask(__name__)
app.config["SECRET_KEY"] = str(uuid4())
IDP_CONFIG = {
"well_known_url": "Identity Provider wellknown url: https://{TENANT}.auth0.com/.well-known/openid-configuration",
@aojea
aojea / README.md
Last active March 2, 2024 13:35
upgrade kind kubernetes cluster
@rougier
rougier / agenda.py
Last active December 14, 2023 19:47
org-mode agenda calendar in the terminal
#!/usr/bin/env python3
# Copyright 2020 Nicolas P. Rougier - BSD License
#
# from reading org-mode emacs files, display a formated calendar in the
# terminal showing holidays and busy days and upcomiing events.
import holidays # https://pypi.org/project/holidays/
import calendar
import datetime
import orgparse # https://pypi.org/project/orgparse
@snivas
snivas / flask_app_mutator_class.txt
Created October 31, 2019 17:16
FLASK_APP_MUTATOR Superset example
def attach_handler(app):
from flask import redirect, url_for
app.wsgi_app = CustomProxyFix(app.wsgi_app)
class CustomProxyFix(object):
def __init__(self, app):
self.app = app
def __call__(self, environ, start_response):
host = environ.get('HTTP_X_FHOST', '')
if host:
@markf3lton
markf3lton / blt-hands-on-tutorial.md
Last active February 1, 2023 18:24
BLT Hands On Tutorial
@psanford
psanford / gopls-config.el
Last active June 23, 2022 20:48
gopls (go lsp-mode) config for emacs with useful optional packages.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Pre gopls/lsp-mode/go-mode setup
;;; This section installs use-package from melpa if it isn't
;;; already installed. You can skip this if you already have use-package
;; enable melpa if it isn't enabled
(require 'package)
(when (not (assoc "melpa" package-archives))
(setq package-archives (append '(("melpa" . "https://melpa.org/packages/")) package-archives)))
(package-initialize)
@rtyler
rtyler / Jenkinsfile
Last active April 24, 2024 05:54
Docker in docker within Jenkins on Kubernetes. Eat at Arby's.
pipeline {
agent {
kubernetes {
label 'dind'
defaultContainer 'docker'
yaml """
---
apiVersion: v1
kind: Pod
metadata:
@vfarcic
vfarcic / agenda.md
Last active January 18, 2022 00:48
@jackblk
jackblk / squid_proxy_tutorial.md
Last active May 2, 2024 05:35
Tutorial on how to setup a squid proxy with authentication.

Note

This tutorial is for Ubuntu & Squid3. Use AWS, Google cloud, Digital Ocean or any services with Ubuntu to follow this tutorial.

Install squid & update

sudo apt-get update
sudo apt-get install squid3
sudo apt-get install apache2-utils