Skip to content

Instantly share code, notes, and snippets.

View joekr's full-sized avatar
💭
setting my status ...

Joe Kratzat joekr

💭
setting my status ...
View GitHub Profile
@joekr
joekr / cluster-template-oraclelinux.yaml
Created March 15, 2022 13:08
cluster-api-provider-oci dynamic shape template
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
labels:
cluster.x-k8s.io/cluster-name: "${CLUSTER_NAME}"
name: "${CLUSTER_NAME}"
namespace: "${NAMESPACE}"
spec:
clusterNetwork:
pods:
@joekr
joekr / Dockerfile-Nginx
Last active November 26, 2023 09:19
Kubernetes + Rails (NGINX & Unicorn) on GCE
# Set nginx base image
FROM nginx
# Copy custom configuration file from the current directory
COPY nginx.conf /etc/nginx/nginx.conf
@joekr
joekr / keybase.md
Created June 20, 2015 19:38
keybase

Keybase proof

I hereby claim:

  • I am joekr on github.
  • I am joekratzat (https://keybase.io/joekratzat) on keybase.
  • I have a public key whose fingerprint is 5A15 7CE4 86C8 9D90 9B64 452D F31D 8021 A7ED 1C26

To claim this, I am signing this object:

@joekr
joekr / Vagrant
Created February 27, 2015 19:20
Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = '2'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = 'hashicorp/precise64'
# Configurate the virtual machine to use 2GB of RAM
@joekr
joekr / Message.rb
Last active August 29, 2015 13:56
Crazy polymorphic multiple has_many association
class Message < ActiveRecord::Base
belongs_to :recipient, :polymorphic => true
belongs_to :sender, :polymorphic => true
end
@joekr
joekr / watch_dog.go
Created December 18, 2013 14:38
Watch Dog
package main
import "fmt"
import "net/http"
import "time"
import "os"
func main() {
if len(os.Args) < 2 {
fmt.Println("Need a url", len(os.Args))
@joekr
joekr / build.gradle
Created October 24, 2013 00:01
default build.gradle for libraries.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5+'
}
}
apply plugin: 'android-library'
@joekr
joekr / user.rb
Last active December 25, 2015 21:49
Rspec a public method which calls a private method.
class User < ActiveRecord::Base
def my_public_method
self.my_private_method
end
private
def my_private_method
true
@joekr
joekr / unicorn.conf
Last active December 25, 2015 05:19
nginx sites-enabled file for generic rails project using unicorn
upstream unicorn_server {
# This is the socket we configured in unicorn.rb
server unix:/srv/www/example/shared/sockets/unicorn.sock fail_timeout=0;
}
server{
listen 80 default;
server_name example;
root /srv/www/example/current/public;
try_files $uri/index.html $uri.html $uri @unicorn;
@joekr
joekr / unicorn.conf
Last active December 25, 2015 04:49 — forked from pshima/unicorn.conf
/path/to/unicorn/log/unicorn.stderr.log
/path/to/production/log/production.log
{
daily
missingok
rotate 14
compress
dateext
# this is important if using "compress" since we need to call