This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: oidc-discovery | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
name: oidc-discovery | |
namespace: oidc-discovery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e -o pipefail | |
cleanup(){ | |
rm -f ${USER}.key ${USER}.csr ${USER}.crt ${NAME}-ca.key ${NAME}-ca.crt | |
} | |
msg(){ | |
echo "$(date) $@" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# create the project | |
oc new-project amq-broker | |
# import the templates (this is done project-wise here) | |
oc replace --force -f \ | |
https://raw.githubusercontent.com/jboss-container-images/jboss-amq-7-broker-openshift-image/76-7.6.0.GA/amq-broker-7-image-streams.yaml | |
for template in amq-broker-76-basic.yaml \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
""" | |
Example app using bottle and multiprocessing for queuing long jobs | |
and using several workers. | |
""" | |
from multiprocessing import Process, Queue, cpu_count | |
from bottle import Bottle, run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
try: | |
import socketserver | |
except ImportError: # Python 2: | |
import SocketServer as socketserver | |
import socket | |
import sys | |
class LoggedUDPServer(socketserver.ThreadingMixIn, socketserver.UDPServer): | |
def __init__(self, server_address, RequestHandlerClass): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import hashlib | |
import hmac | |
import urllib | |
def get_sso_url(email, name, base_url, key, redirect_url=None, phone=None, company=None): | |
"""This function returns the Freshdesk SSO URL. | |
For more info look at https://goo.gl/NISgpr | |
""" | |
utctime = int(time.time()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
import datetime | |
import sys | |
import time | |
import threading | |
import traceback | |
import SocketServer | |
from dnslib import * | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2015 Pietro Bertera <pietro@bertera.it> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
#-*- coding : utf-8 -*- | |
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: | |
""" | |
Flask-Codemirror | |
~~~~~~~~~~~~~~~~ | |
Manage a source code field using CodeMirror and WTForms | |
for Flask |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from xml.sax.handler import ContentHandler | |
from xml.sax import make_parser | |
from glob import glob | |
import sys | |
def parsefile(file): | |
parser = make_parser() | |
parser.setContentHandler(ContentHandler()) |