Skip to content

Instantly share code, notes, and snippets.

Avatar
⚜️
ǝʌᴉʇɔǝdsɹǝd ɹnoʎ ǝƃuɐɥƆ

Srdjan Grubor sgnn7

⚜️
ǝʌᴉʇɔǝdsɹǝd ɹnoʎ ǝƃuɐɥƆ
View GitHub Profile
@sgnn7
sgnn7 / docker-compose.compiler.yml
Last active Sep 4, 2020
Puppet w/ Compile Masters Test Env
View docker-compose.compiler.yml
version: "3"
services:
# Puppet - Compilation Server
puppet-compiler:
image: puppet/puppetserver:${PUPPET_SERVER_TAG:-latest}
network_mode: "host"
ports:
- 8140
volumes:
@sgnn7
sgnn7 / install_local_puppetmaster.sh
Last active Jun 26, 2020
Install Puppet6 on Ubuntu w/ dev `cyberark-conjur` module script
View install_local_puppetmaster.sh
#!/bin/bash
set -euo pipefail
if [ $EUID != 0 ]; then
echo "Must run this script as root!"
exit 1
fi
PUPPET_VERSION=6
@sgnn7
sgnn7 / README.md
Last active Jun 16, 2020
Upgrading Conjur OSS Helm chart from `v1.3.8` to `v2.0.0`
View README.md

Upgrade

Info here assumes you are in the base of https://github.com/cyberark/conjur-oss-helm-chart repo

Save config values

This assumes that only conjur is in the specified namespace. If not, manually set the helm_chart_name variable

ns="<REPLACE_YOUR_DEPLOYMENT_NAMESPACE>"
View log_test.go
package log
import (
"bytes"
"fmt"
"reflect"
"regexp"
"strings"
"testing"
@sgnn7
sgnn7 / 0001_root.yml
Last active Mar 6, 2019
CyberArk Conjur IAM authentication
View 0001_root.yml
- !policy conjur/cluster
- !policy conjur/authn-iam
- !policy myapp
@sgnn7
sgnn7 / golang_loop.go
Last active Oct 7, 2020
Simple async golang loop
View golang_loop.go
package main
import (
"log"
"math"
"os"
"strconv"
"time"
)
@sgnn7
sgnn7 / add_follower_seed_secrets
Last active Oct 7, 2020
Conjur running using k8s secrets
View add_follower_seed_secrets
#!/bin/bash -e
set -o pipefail
CURRENT_DIR=$(dirname $0)
SEED_FILES_DIR="$CURRENT_DIR/tmp"
FOLLOWER_SEED_FILE="$SEED_FILES_DIR/follower-seed.tar"
TEMP_CERT_DIR="$CURRENT_DIR/tmp"
View error_class.rb
class OldErrorClass
def self.new(msg)
Class.new(RuntimeError) do
def initialize(*args)
@args = args
end
define_method(:to_s) do
@args.each.with_index.reduce(msg) do |m,(x,i)|
m.gsub(Regexp.new("\\{#{i}}"), x || 'nil')
end
@sgnn7
sgnn7 / dynamic_obj_creation.go
Last active Jun 18, 2018
Instantiate an abstract Golang struct dynamically with parameters
View dynamic_obj_creation.go
package main
// Author: Srdjan Grubor
// License: Apache-2.0
import (
"fmt"
)
// Interface common for all classes
You can’t perform that action at this time.