Skip to content

Instantly share code, notes, and snippets.

View styk-tv's full-sized avatar

Peter Styk styk-tv

View GitHub Profile
@styk-tv
styk-tv / ubu22 pyenv
Last active May 12, 2023 14:47 — forked from jmvrbanac/install_pyenv.sh
ubu22 pyenv
#!/bin/bash
sudo apt-get install git python3-pip make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl liblzma-dev
sudo pip install virtualenvwrapper
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
@styk-tv
styk-tv / git-status-recursive
Created September 7, 2018 19:41 — forked from dbu/git-status-recursive
recursive git status
#!/usr/bin/php
<?php
$repos = array();
exec('find -type d -name .git | sed -e "s/\.git//"', $repos);
foreach ($repos as $repo) {
$status = shell_exec("cd $repo && git status");
if (false == strpos($status, 'nothing to commit (working directory clean)')) {
echo "$repo\n" . str_repeat('-', strlen($repo)) . "\n$status\n\n";
}
}
@styk-tv
styk-tv / git-repo-demo.yaml
Created September 3, 2018 14:27 — forked from tallclair/git-repo-demo.yaml
More secure GitRepo volumes
# Example of using an InitContainer in place of a GitRepo volume.
# Unilke GitRepo volumes, this approach runs the git command in a container,
# with the associated hardening.
apiVersion: v1
kind: Pod
metadata:
name: git-repo-demo
annotations:
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
spec:
#!/usr/bin/env/ruby
require 'socket'
# AWS API Credentials
AWS_ACCESS_KEY_ID = "your-aws-access-key-id"
AWS_SECRET_ACCESS_KEY = "your-aws-secret-access-key"
# Node details
NODE_NAME = "webserver-01.example.com"