Skip to content

Instantly share code, notes, and snippets.

View Cryptophobia's full-sized avatar
〰️
always seeking a state of flow

AMO ❤️⛺✨ Cryptophobia

〰️
always seeking a state of flow
View GitHub Profile

Keybase proof

I hereby claim:

  • I am cryptophobia on github.
  • I am cryptophobia (https://keybase.io/cryptophobia) on keybase.
  • I have a public key ASDF-iAOoXwdUk1mR-OKK9CHoOGW-OTBZPZPrM9n7NDWKAo

To claim this, I am signing this object:

@Cryptophobia
Cryptophobia / weave_password
Last active June 14, 2018 20:08
Encryption on weave-net
From issue: https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/699
I've investigated using password encryption with weave. If you've followed the instructions for deploying kubernetes with KOps, the default deployment uses weave. Weave has a capability of employing password encryption. Once activated. The encryption in transit is seamless.
Here are the steps so far
Install Kubernetes with KOps per the z2jh documentation steps.
(optional) run kubectl --namespace kube-system get pods and verify there are weave-net pods
Create a password file. I did openssl rand -hex 128 >weave-passwd
Create a Kubernetes Secret in the kube-system namespace
kubectl edit deploy deis-router -n deis
...
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 9090
scheme: HTTP
initialDelaySeconds: 1
@Cryptophobia
Cryptophobia / install-v2.sh
Created January 4, 2018 16:24
Deis Workflow CLI install script
#!/usr/bin/env sh
# Invoking this script:
#
# To install the latest stable version:
# curl https://deis.io/deis-cli/install-v2.sh | sh
#
# To install a specific released version ($VERSION):
# curl https://deis.io/deis-cli/install-v2.sh | sh -s $VERSION
#
@Cryptophobia
Cryptophobia / kube-resque-pre-stop.sh
Last active November 9, 2018 22:34
preStop Kubernetes Lifecycle Resque Hook
#!/bin/bash
# This script gracefully stops resque workers by issuing the USR2
# signal to the resque-pool manager and then waits for the workers
# to be paused before exiting. Resque-pool master process relays
# the USR2 signal to the children.
#
# For reference:
# (1) https://github.com/nevans/resque-pool#signals
# (2) https://github.com/resque/resque/blob/master/lib/resque/worker.rb#L376-L378
@Cryptophobia
Cryptophobia / git-info.sh
Last active February 21, 2017 23:13
git info command
#!/bin/sh
#
# git-info - shows information about a Git repository a la `svn info'
#
# How to use:
# $ git info
# $ git info ~/src/somewhere/somefile
# $ git info some/relative/file_or_directory
# $ git info ~/repos/something.git
#
@Cryptophobia
Cryptophobia / ssl_puma.sh
Created February 3, 2017 19:17 — forked from tadast/ssl_puma.sh
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
cd /Library/Preferences
sudo rm com.sophos.sav.plist
--or--
sudo rm com.sophos.*

cd /Library/Application\ Support/Sophos/cloud/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer --force_remove

Sometimes the Sophos virus can exist in the /Library/Application.../Sophos/saas folder
@Cryptophobia
Cryptophobia / teamcity-agent-ubuntu.md
Created November 3, 2016 15:06 — forked from guifromrio/teamcity-agent-ubuntu.md
Instructions to Setup Teamcity Agent on EC2 Ubuntu 12.04.2 Linux with NodeJS and PhantomJS
@Cryptophobia
Cryptophobia / teamcity-agent.sh
Last active October 26, 2016 17:32
/etc/init.d/teamcity
#! /bin/sh
# /etc/init.d/teamcity
# Common parameters, do not edit:
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="TeamCity Agent"
NAME=teamcity-agent
SCRIPTNAME=/etc/init.d/$NAME
#
# User specific parameters:
USERNAME=ubuntu