Skip to content

Instantly share code, notes, and snippets.

@jpiepkow
jpiepkow / main.rs
Created October 14, 2020 18:26
advent-of-code_day-5_2017
#[derive(Debug)]
struct Instruction {
value: i16
}
impl Instruction {
fn incr(&mut self) {
self.value += 1
}
}
@jpiepkow
jpiepkow / input.txt
Created October 13, 2020 18:47
A Maze of Twisty Trampolines, All Alike input
0
0
0
1
2
-1
0
-5
-6
-5
// cron type
struct Cron {
seconds: Seconds,
minutes: Minutes,
hours: Hours,
day_of_month: DOM,
months: Months,
day_of_week: DOW,
}
// routes each type(ex seconds) to the specific function to decode into human readable
// cron type
struct Cron {
seconds: Seconds,
minutes: Minutes,
hours: Hours,
day_of_month: DOM,
months: Months,
day_of_week: DOW,
}
// routes each type(ex seconds) to the specific function to decode into human readable
@jpiepkow
jpiepkow / kube-main.yaml
Created November 30, 2019 18:39
kube file for generic deployment.
apiVersion: v1
kind: Namespace
metadata:
name: $ENV-$REPO_NAME
---
apiVersion: v1
data:
.dockerconfigjson: $DOCKER_SECRET
kind: Secret
metadata:
@jpiepkow
jpiepkow / main.yml
Created November 30, 2019 18:20
github action for kube deployment with ansible for secrets.
name: CI
on:
push:
branches:
- staging
- master
jobs:
build:
@jpiepkow
jpiepkow / codeship-elixir.sh
Last active June 30, 2018 22:46 — forked from paulgoetze/codeship-elixir.sh
Codeship Elixir/Phoenix test setup
#!/bin/bash
# Erlang
ERLANG_VERSION=${ERLANG_VERSION:-20.2}
ERLANG_CACHED_DOWNLOAD="${HOME}/cache/OTP-${ERLANG_VERSION}.tar.gz"
ERLANG_DIR=${ERLANG_DIR:="$HOME/erlang"}
# Elixir
ELIXIR_VERSION=${ELIXIR_VERSION:-1.6.3}
ELIXIR_CACHED_DOWNLOAD="${HOME}/cache/elixir-v${ELIXIR_VERSION}.zip"
@jpiepkow
jpiepkow / install_ex.sh
Created June 30, 2018 22:25 — forked from jimsynz/install_ex.sh
I use this to install Elixir on Codeship.
#!/bin/sh
# I use this to install Elixir on our codeship instances for testing. YMMV.
# curl -O https://gist.githubusercontent.com/jamesotron/44f8962cddef781ab830/raw/e75599e95587cbca26e707505fd40dd0f26eb0f5/install_ex.sh
# . ~/install_ex.sh
# You can override your Elixir and Erlang versions from your shell when you call ./install_ex.sh.
export ERLANG_VERSION=${ERLANG_VERSION:-18.0.3}
export ELIXIR_VERSION=${ELIXIR_VERSION:-1.0.5}