Skip to content

Instantly share code, notes, and snippets.

@lblackstone
lblackstone / watch.ts
Created August 18, 2020 23:09
Use streamInvoke to watch k8s Event stream
import * as k8s from "@pulumi/kubernetes";
import { streamInvoke } from "@pulumi/pulumi/runtime";
import * as pulumi from "@pulumi/pulumi";
// Install the sealed secret controller.
new k8s.yaml.ConfigFile("sealed-secret-controller", {
file: "https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.12.4/controller.yaml",
})
// Create a SealedSecret.
@lukehoban
lukehoban / waitForJob.ts
Last active August 4, 2020 21:03
Pulumi program which waits on Jobs during a Kubernetes deployment
import * as pulumi from "@pulumi/pulumi";
import * as k8s from "@pulumi/kubernetes";
import * as k8sOutput from "@pulumi/kubernetes/types/output";
import * as k8sapi from 'kubernetes-client';
const job = new k8s.batch.v1.Job("job", {
spec: {
template: {
spec: {
containers: [{
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active March 16, 2024 13:18
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@ruanbekker
ruanbekker / cheatsheet-elasticsearch.md
Last active April 24, 2024 00:11
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl
@stamler
stamler / install_splunk.sh
Created December 10, 2014 21:17
Install Splunk Enterprise 6.2 on CentOS 7 Minimal as a non-root user systemd service and enable syslog on port 514 and http on port 80
#!/bin/bash
# Install Splunk 6.2 on CentOS 7 as a non-root user service that runs on boot with
# systemd. This script also opens the firewall to allow syslog on UDP port 514. Since
# we're running Splunk as non-root, this port is then forwarded to 5514. Configuring a
# syslog input in slunk on UDP 514 will gather this data. Must be run as root
# Create Account
useradd splunk
groupadd splunk
@soarez
soarez / ca.md
Last active May 3, 2024 00:04
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@rcotrina94
rcotrina94 / How to use Images as Radio buttons.md
Last active February 22, 2024 13:29
How to use images for radio buttons (input-radio).
@andrewlkho
andrewlkho / gist:7373190
Last active March 25, 2024 03:37
How to use authentication subkeys in gpg for SSH public key authentication

GPG subkeys marked with the "authenticate" capability can be used for public key authentication with SSH. This is done using gpg-agent which, using the --enable-ssh-support option, can implement the agent protocol used by SSH.

Requirements

A working gpg2 setup is required. It may be possible to use gpg 1.4 but with gpg-agent compiled from gpg2. If you are using OS X 10.9 (Mavericks) then you may find the instructions [here][1] useful.

@codesplicer
codesplicer / app.py
Created November 9, 2012 12:56
flask-mongoengine in a blueprint
# Flask related imports
from flask import Flask, render_template, jsonify, abort, request, make_response, session, redirect, url_for
# Flask extensions
from flask.ext.mongoengine import MongoEngine
from flask_debugtoolbar import DebugToolbarExtension
# Flask blueprints
import companies
from companies.views import companies