RSS Amplifier

Blog

Josh Rendek

Recent content on Josh Rendek

joshrendek.comRSS feed ↗15 posts

Latest posts

Prefix date in properties when using ox-hugo and emacs

If you’re using ox-hugo and want to have it generate markdown files with the date prefixing the markdown title you can use this snippet to do it on save with org-hugo-auto-export-mode turned on. 
 1 ( defun ox-date-slug-prop () 
 2 ( interactive ) 
 3 ( let (( dt ( format-time-string '%Y-%m-%d' ( apply #'encode-time ( org-parse-time-string ( org-entry-get ( point ) 'EXPORT_DATE'…

Affordable logging for kubernetes hobby projects

Having a useable logging and metrics stack for your hobby projects can be extremely expensive if you
stick them inside your kubernetes cluster or try and host them on a normal VPS provider (whether that means DigitalOcean or AWS). 
 Below is an example configuration I use for some hobby projects that uses a dedicated hosting provider (OVH). 
 This solves two main problems for me:…

Go Buffalo: Adding a 2nd database

If you need to connect to multiple databases in your buffalo app open up your
 models/models.go file: 
 Up at the top add a new var like: 
 1 var YourDB * pop . Connection 
 then in the init() func you can connect to it - the important part is to make
sure you call .Open : 
 1 	 YourDB , err = pop . NewConnection ( & pop . ConnectionDetails { 
 2 		 Dialect…

VS Code Server: Go and getting Buffalo setup with Postgres

We’ll go over everything needed to get a small development environment up and running using code-server, buffalo and postgres for a remote dev environment. 
 First lets install Go and Buffalo with gofish : 
 1 apt-update
 2 curl -fsSL https://raw.githubusercontent.com/fishworks/gofish/master/scripts/install.sh | bash
 3 gofish init
 4 gofish install go 
 5 gofish…

Cloud9: Updating Go and getting Buffalo setup with Postgres

When you setup your cloud9 IDE for the first time, it comes pre-installed with
go1.9 - if you’d like to update to the latest (as of this writing), just run the
following commands: 
 1 wget https://golang.org/dl/go1.14.6.linux-amd64.tar.gz
 2 sudo tar -C /usr/local -xzf ./go1.14.6.linux-amd64.tar.gz
 3 mv /usr/bin/go /usr/bin/go-old # move the old binary 
 Edit your…

15 Years of Remote Work

In one form or another I’ve worked remotely since 2005 (with a brief mix of
remote/onsite for about 2 years). 
 Below is a checklist of the things I’ve found that are required to have a
succesful remote work life and ensure you join a great remote team. 
 Why I like working remote 
 If it’s going to be your first time working remote, you should figure out…

Buffalo, gqlgen, and graphql subscriptions

Here’s a sample application to show how to stitch together Buffalo, gqlgen
and graphql subscriptions. Github Repo 
 
 I’ll go over the important parts here. After generating your buffalo application
you’ll need a graphql schema file and a gqlgen config file: 
 1 # schema.graphql 
 2 type Example { 
 3 	 message : String 
 4 } 
 5 
 6…

Helm: Error: UPGRADE FAILED: "CHARTNAME" has no deployed releases

If you’ve been using helm you’ve inevitably run into a case where a 
 1 helm upgrade --install
 has failed and helm is stuck in a FAILED state when you list your deployments. 
 Try and make sure any old pods are cleared up (ie: if they’re OutOfEphemeralStorage or something other error condition). 
 Next to get around this without doing a helm delete NAME --purge :…

Go: Copying an interface to a new interface to unmarshal types

This is useful if you’re building a generic library/package and want to let people pass in types and convert to them/return them. 
 1 package main 
 2 
 3 import ( 
 4 	 'encoding/json' 
 5 	 'fmt' 
 6 	 'reflect' 
 7 ) 
 8 
 9 type Monkey struct { 
 10 	 Bananas int 
 11 } 
 12 
 13 func main () { 
 14 	…

Helm not updating image, how to fix

If you have your imagePullPolicy: Always and deploys aren’t going out (for example if you’re using a static tag, like stable ) - then you may be running into a helm templating bug/feature. 
 If your helm template diff doesn’t change when being applied the update won’t go out, even if you’ve pushed a new image to your docker registry. 
 A quick way to fix this…

Faster Local Dev With Minikube

If your developing against kubernetes services or want to run your changes without pushing to a remote registry and want to run inside kubernetes: 
 First create a registry running in minikube: 
 1 kubectl create -f https://gist.githubusercontent.com/joshrendek/e2ec8bac06706ec139c78249472fe34b/raw/6efc11eb8c2dce167ba0a5e557833cc4ff38fa7c/kube-registry.yaml
 Forward your localhost:5000…

Kubernetes On Bare Metal


 Table of Contents 
 
 Goals 
 Options 
 Servers 
 Init Scripts 
 NFS Server 
 Master Node 
 Worker Node(s) 
 Pod Networking (Flannel) 
 Kubernetes Dashboard 
 NFS Storage Class 
 Installing Helm 
 Installing Heapster 
 Installing Traefik 
 Private Docker Registry 
 Configuring Credentials 
 Deploying Your Applications 
…

About


 
 
 I am a full stack developer with a passion for learning new things, especially security related. I love hard
problems, building automation and monitoring tools to delivery highly available applications. My outside
interests include wood working, cooking, video games, and gardening. 


Projects

Maintained 
 
 threatwar.com 
 
 a honeypot service. 
 
 
 threatwar agent 

 
 the open source agent for threatwar 
 
 
 garden.gg 
 
 a garden tracking tool and plant journal. 
 
 
 ifcfg.net 
 
 a simple ‘what is my ip’ service with a few extra endpoints 
 
 
 redis rate limiter 

…

Security and Software of hosts on the Tor Network

The goal of this project was to start with a base directory (in this case The Hidden Wiki) and start spidering out to discover all reachable Tor servers. Some restrictions were placed on this after a few trial runs: 
 
 Only HTML/JSON was parsed/spidered for more links to follow (no jpegs/xml, etc) 
 There were a few skipped websites, noteably: Facebook, Reddit, and a few Blockchain…