Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

#cloud-config
hostname: ros01.lan.justyn.io
ssh_authorized_keys:
- github:justyns
rancher:
resize_device: /dev/sda
@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
This file has been truncated, but you can view the full file.
# Hosts file generated at Tue May 31 18:46:48 CDT 2022
0.0.0.0 000001.net.daraz.com
0.0.0.0 0000rrrvvv.duckdns.org
0.0.0.0 000-038.net.daraz.com
0.0.0.0 0001.2waky.com
0.0.0.0 0001-qemu-deteministic-record-and-replay.net.daraz.com
0.0.0.0 000-221.net.daraz.com
0.0.0.0 0001.best
0.0.0.0 0005.net.zooplus.com
0.0.0.0 0001-cab8-4c8c-43de.reporo.net
@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:
# /srv/salt/formula1/pillar/formula1.sls
formula1:
some: stuff
foo:
- bar
@justyns
justyns / configuration.yaml
Last active December 17, 2015 20:00
Quick hack to get the fastest route from/to home to/from work, and post it to mqtt so that Home Assistant/Openhab can pick it up. I had issues getting the paho mqtt library working for some reason, so I just resorted to using the mosquitto_pub client.
- platform: mqtt
state_topic: "traffic/worktohome/fastest"
name: "Traffic work to home"
unit_of_measurement: "minutes"
state_format: "json:minutes"
- platform: mqtt
state_topic: "traffic/hometowork/fastest"
name: "Traffic home to work"
unit_of_measurement: "minutes"
state_format: "json:minutes"
@justyns
justyns / simplegoURLShortener.go
Created September 14, 2015 13:26
Simple Go URL Shortener. No persistence, just stores everything in memory.
package main
import (
"fmt"
"net/http"
"strconv"
)
type ShortURL struct {
ID uint64
/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.