Skip to content

Instantly share code, notes, and snippets.

class Watchman < Formula
desc "Watch files and take action when they change"
homepage "https://github.com/facebook/watchman"
license "Apache-2.0"
revision 5
head "https://github.com/facebook/watchman.git"
stable do
url "https://github.com/facebook/watchman/archive/v4.9.0.tar.gz"
sha256 "1f6402dc70b1d056fffc3748f2fdcecff730d8843bb6936de395b3443ce05322"
AWSTemplateFormatVersion: '2010-09-09'
Description: <Your description>
Parameters:
Domain:
Type: String
Default: <default domain URI>
AllowedValues:
- <list of allowed domain URIs>
body {
font-family: 'nunito', sans-serif !important;
/* src: url('https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i'); */
text-rendering: optimizeLegibility important;
font-weight: 500 !important;
word-spacing: -1px;
color: white;
background: #222222;
}
function _git_prompt() {
local git_status="`git status -unormal 2>&1`"
if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then
if [[ "$git_status" =~ nothing\ to\ commit ]]; then
local ansi=42
elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then
local ansi=43
else
local ansi=45
fi
@pdehlke
pdehlke / vaultsealmanager.sh
Created May 11, 2017 18:29 — forked from ccampanale/vaultsealmanager.sh
Bash shell script to check seal status for local vault server and attempt to unseal using keys secured in vault secret store. Supports HA Vault clusters with TLS with unseal keys stored as secrets in vault (see code). Relies on registered service vault.service.consul, in place DNS configuration, and a single unsealed vault instance in your clust…
#!/bin/bash
export vault=/usr/local/bin/vault
export VAULT_TOKEN=$(cat /root/.vault-token)
vault_cacert='-ca-cert=/path/to/your/ca.pem'
local_vault="-address=https://$(hostname -f):8200"
unsealed_vault="-address=https://$(getent hosts $(dig +short vault.service.consul | tail -n 1) | awk '{ print $2 }'):8200"
leader_vault="-address=https://$($vault status $vault_cacert $unsealed_vault 2> /dev/null | grep Leader | awk '{ print $2 }' | sed 's/^http\(\|s\):\/\///g'):8200"
vault_read="$vault read $vault_cacert $leader_vault"
vault_unseal="$vault unseal $vault_cacert $local_vault"
@pdehlke
pdehlke / tmux.conf
Created May 10, 2017 11:42 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
'use strict';
const aws = require('aws-sdk');
const s3 = new aws.S3({ apiVersion: '2006-03-01' });
exports.handler = (event, context, callback) => {
const key = decodeURIComponent(event.Records[0].s3.object.key);
const meta = key.split('/');
@pdehlke
pdehlke / gist:1d7dbdee72781d659dcbe6164eb2ad3a
Created April 28, 2017 16:00
Are the Java Unlimited Cryptography Extension JARs installed?
$JAVA_HOME/bin/jrunscript -e 'print (javax.crypto.Cipher.getMaxAllowedKeyLength("RC5") >= 256);'
@pdehlke
pdehlke / gist:f19fa945a6c60109ca3d
Created January 16, 2015 17:37
tmux.conf.user
set -g status-right "#h %d %b %Y :: %l:%M %p"
# Keep my window names
setw -g automatic-rename off
# integrate the mouse. We can click on panes, and drag to resize.
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
{
"title": "Apache and Tomcat Logs",
"services": {
"query": {
"list": {
"0": {
"query": "apache !tomcat !static",
"alias": "",
"color": "#7EB26D",
"id": 0,