Skip to content

Instantly share code, notes, and snippets.

@maxvt
maxvt / infra-secret-management-overview.md
Last active February 28, 2024 20:53
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@msoap
msoap / script.go
Last active October 8, 2022 17:23
Run Go program as script
//usr/bin/env go run $0 "$@"; exit
package main
import (
"fmt"
"os"
)
func main() {
fmt.Println("Hello world!")
@aral
aral / gist:8122688
Created December 25, 2013 12:08
Using nginx for dev is much faster than grunt-contrib-connect (especially with a livereload workflow) but grunt-nginx doesn’t automatically shut down the server when exiting (e.g., on CTRL-C when watching, or if there is an exception). This little snippet will detect and shut down the server.
# e.g. set up nginx task
module.exports = (grunt) ->
grunt.initConfig
nginx:
options:
config: '/usr/local/etc/nginx/nginx.conf'
# …
# Make sure we shut down the nginx server in case it’s running.
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@vitorgalvao
vitorgalvao / Right Click.applescript
Last active March 16, 2023 14:30
Make right-clicking on OSX accessible via a keyboard shortcut
(*
A [native solution][1] exists but it suffers from a major flaw: it right-clicks where the cursor is, not what on the selection.
This code addresses that limitation, though it only works on Finder windows and not the Desktop.
You can install it as a [Finder Service, and later asign it a keyboard shortcut][2].
[1]: http://stackoverflow.com/questions/9171613/right-click-shortcut-for-mac-lion-os
[2]: http://www.macosxautomation.com/services/learn/tut01/index.html
*)
@jewelsea
jewelsea / WebViewCaptureDemo.java
Created May 23, 2013 05:38
Captures web pages to image files using JavaFX WebView and ImageIO
import javafx.animation.PauseTransition;
import javafx.application.Application;
import javafx.beans.value.*;
import javafx.embed.swing.SwingFXUtils;
import javafx.event.*;
import javafx.geometry.Bounds;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.image.*;
import javafx.scene.layout.*;
@hakobera
hakobera / connect-cluster.js
Created October 22, 2012 14:10
NGINX vs Node static server
var cluster = require('cluster'),
connect = require('connect');
var numCPUs = parseInt(process.argv[2]);
if (cluster.isMaster) {
for (var i = 0; i < numCPUs; i++) {
cluster.fork();
}
@nicoulaj
nicoulaj / java-signals-test.sh
Created September 20, 2012 20:08
What signals can your JRE handle ?
#!/bin/bash
# Get temp dir
tmpdir=$(mktemp -d)
# Generate test
cat > ${tmpdir}/ListenToSignal.java <<EOF
import sun.misc.Signal;
import sun.misc.SignalHandler;
public class ListenToSignal {
@jonsullivan
jonsullivan / cors-middleware-express-with-proxy.js
Created July 17, 2012 01:22
node.js CORS http-proxy / express middleware
// node.js proxy server example for adding CORS headers to any existing http services.
// yes, i know this is super basic, that's why it's here. use this to help understand how http-proxy works with express if you need future routing capabilities
var httpProxy = require('http-proxy'),
express = require('express');
var proxy = new httpProxy.RoutingProxy();
var proxyOptions = {
host: '192.168.3.11',
@haf
haf / gist:2843680
Created May 31, 2012 14:19
Get SSH working on Vagrant/Windows/Git

If you are using vagrant, you probably-statistically are using git. Make sure you have its binary folder on your path, because that path contains 'ssh.exe'.

Now, modify C:\vagrant\vagrant\embedded\lib\ruby\gems\1.9.1\gems\vagrant-1.0.3\lib\vagrant\ssh.rb to comment out the faulty Windows check and add a real SSH check:

# if Util::Platform.windows?
  # raise Errors::SSHUnavailableWindows, :host => ssh_info[:host],
                                       # :port => ssh_info[:port],
                                       # :username => ssh_info[:username],
 # :key_path =&gt; ssh_info[:private_key_path]