Skip to content

Instantly share code, notes, and snippets.

@justyns
justyns / GnuPG-2.2.md
Last active October 2, 2019 04:55 — forked from simbo1905/GnuPG-2.2.md
Build/install instructions for GnuPG 2.2.x on Centos 7 and similar distros (formerly for 2.1.x)

GnuPG 2.2.x Build Instructions

Below are my build instructions for GnuPG 2.2.17, released on July 12th, 2018. These instructions are built for a headless Centos 7 LTS server (specificaly the openshift/base-centos7 docker image).

You use the below install script to install GnuPG 2.2.x by running the following commands:

# if you are root in a docker image:
curl -OL "https://gist.githubusercontent.com/justyns/79e7e8a0750abb609a05fca50956e4a3/raw/1ca349eaa93247a18047416a44c05480669f5d86/install-gnupg22.shsh" && bash ./install-gnupg22.sh
@justyns
justyns / README.md
Last active January 14, 2019 22:25 — forked from atheiman/README.md
Vault secret saved as file in app pod

These Kubernetes resource manifest yaml files demonstrate

  1. vault.yaml
  • setting up a test vault service
  • configuring the vault service with kubernetes auth and a role for a test app
  1. app.yaml
  • running an app with a vault-init initContainer to login to vault and obtain a token
  • a vault-secret-manager container to continuously interact with vault throughout the lifecycle of the app
  • an app container to use the secret saved by the vault-secret-manager container
@justyns
justyns / hass
Created September 26, 2016 03:55 — forked from damoun/hass
home-assistant rc script for Freebsd
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: hass
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
/etc/init.d/cloud-management stop
mysql -ppassword -e 'drop database cloud'
mysql -ppassword -e 'drop database cloud_usage'
cloud-setup-databases cloud:password@localhost --deploy-as=root:password
rm -rf /var/log/cloud/management/*
cloud-setup-management
/etc/init.d/cloud-management start

If your system vm is not currently working you have to make it work. On XenServer you can do this by SSH'ing to it and upgrade java.

apt-get update && apt-get -y install openjdk-7-jre-headless openjdk-7-jre-lib && apt-get -y remove openjdk-6-jre-headless

and it should now work. In some rare cases you have to restart the cloud service

service cloud stop && sleep 3 && service cloud start

and in some even rarer cases you have to restart the ssvm. Do that from the Apache CloudStack UI.

#!/bin/bash
matches=()
directory='/opt/graphite/storage/whisper'
for file in $(find $directory -type f -name '*.wsp' -print); do
$(python /usr/local/bin/whisper-info.py $file > /dev/null 2>&1)
retval=$?
echo "checking $file"
[ $retval -ne 0 ] && matches+=($file)
#!/bin/sh
PORT=4200
sudo launchctl unload /Library/LaunchDaemons/com.crashplan.engine.plist
sudo sed -i '' "s/\(<servicePort>\)[^<]*/\1$PORT/" /Library/Application\ Support/CrashPlan/conf/my.service.xml
sed -i '' "s/#*\(servicePort=\).*/\1$PORT/" /Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties
defaults write /Applications/CrashPlan.app/Contents/Resources/CrashPlan\ menu\ bar.app/Contents/Info CPPort $PORT
sudo launchctl load /Library/LaunchDaemons/com.crashplan.engine.plist

Logstash Performance Testing

Server Details

HP BL460

  • 48 Gb Memory
  • 2 x X5675 @ 3.07GHz
  • 2 x 10 gbps NIC
  • 2tb NetApp NFS volume for ES data
import redis
import web
SESSION = 'SESSION:'
class RedisStore(web.session.Store):
"""Store for saving a session in redis:
import rediswebpy
session = web.session.Session(app, rediswebpy.RedisStore(), initializer={'count': 0})