Skip to content

Instantly share code, notes, and snippets.

Admir Trakic atrakic

  • pwnd
  • Copenhagen
Block or report user

Report or block atrakic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View resume.json
"basics": {
"name": "Admir Trakic",
"label": "DevOps engineer",
"email": "",
"phone": "(45) 29133654",
"website": "",
"summary": "Software engineer with hands on experience in building and running resilient solutions in the cloud.",
"location": {
"city": "Vanloese",

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server:

if [ "$#" -ne 1 ]; then
echo "Usage: $0 password"
echo "Specify your host's LAN IP and the desired Pihole password"
exit 1
if [ "$#" -ne 1 ]; then
echo "Usage: $0 password"
echo "Specify your host's LAN IP and the desired Pihole password"
exit 1
atrakic / gitlab-ci.yaml
Created Oct 16, 2019 — forked from lucj/gitlab-ci.yaml
kube deployment
View gitlab-ci.yaml
stage: deploy
environment: test
image: dtzar/helm-kubectl:2.12.3
- kubectl config set-cluster sophia-cluster --server=${KUBE_URL} --certificate-authority="${KUBE_CA_PEM_FILE}"
- kubectl config set-credentials sophia-admin --token=${KUBE_TOKEN}
- kubectl config set-context sophia-context --cluster=sophia-cluster --user=sophia-admin --namespace ${KUBE_NAMESPACE}
- kubectl config use-context sophia-context
- helm upgrade --reuse-values --set image.tag=$CI_BUILD_REF sophia k8s-chart
atrakic / urlencode
Created Oct 14, 2019 — forked from cbron/urlencode
URL encode/decode script
View urlencode
import urllib
import sys
text = sys.argv[1]
encoded = urllib.quote_plus(text)
print encoded
atrakic /
Created Oct 14, 2019 — forked from daxmc99/
#set -x
#set -e
k3d delete --name='rio'
k3d create -n rio --image rancher/k3s:v0.8.1 --publish 80:80 --publish 443:443 --publish 9443:9443 --publish 9080:9080 &&
declare -i i; i=0
until k3d get-kubeconfig --name='rio'
if (( i > 20 )); then
View gist:5a3a5bc974c98ab1b71dd69eee0e5856
name: hashicorp/terraform:light
- '/usr/bin/env'
- 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
- rm -rf .terraform
- terraform --version
- mkdir -p ./creds
View Howto_kubespray_vagrant
# 1) Install
git clone
# 2) Fix port fwd:
cat vagrant/config.rb
$forwarded_ports = {6443 => 6443}
# 3) Follow steps 3-8: (
# 4) Verify installment (still while on vagrant host)
# install RPM package (due to its size intentinally omited from Dockerfile):
yum install -y java-1.8.0-openjdk-devel.x86_64
# get id in which java process we are interested:
JPID=$(jps -l|grep query | awk '{print $1}')
# prepare for filegen:
FILE=dump-$(date +"%s").hprof
You can’t perform that action at this time.