Skip to content

Instantly share code, notes, and snippets.

View voxmaster's full-sized avatar
🇺🇦

Oleksii Marchenko voxmaster

🇺🇦
View GitHub Profile
@voxmaster
voxmaster / kubedf
Last active October 23, 2019 07:44 — forked from redmcg/kubedf
Bash script to show k8s PVC usage
#!/usr/bin/env bash
KUBEAPI=127.0.0.1:8001/api/v1/nodes
function getNodes() {
curl -s $KUBEAPI | jq -r '.items[].metadata.name'
}
function getPVCs() {
jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\
@voxmaster
voxmaster / Biostar2-SyncUsersFromAD.ps1
Created January 23, 2019 19:22
Suprema Biostar2 user profile changes and provisioning from Active Directory
# Run this script with administrator privileges
# This script uses Suprema Biostar2 cloud API
# This script matches email address filed from Active Directory user and from Biostar2 account, and than makes some profile changes or provisioning
# If you like this script: star it
# If you want to chage it: fork it
# If you want me to adopt this script for you: contact me via github (voxmaster) or https://www.upwork.com/fl/oleksiimarchenko9
# Set basic variables
$adBiostarGroup1 = Get-ADGroup "Biostar2-Office1-employees" # Users from this Active Directory group will be proceed in script
$adBiostarGroup2 = Get-ADGroup "Biostar2-Office2-employees" # Users from this Active Directory group will be proceed in script
$adSearchBase = "OU=Accounts,OU=YOUR_COMPANY,DC=domain,DC=local" # LDAP search base
@voxmaster
voxmaster / ad_users.sls
Created August 4, 2018 13:31
Saltstack - State file for users from Active Directory
# Execute USERS PRESENT for each user, who is a member of Active Directory Group, which matches the beginning of minion ID,
# like: salt-[projectName]-[service]-[environment]-[moreAttrs]*
{% if 'ad_salt_users' in pillar %}
{% for ad_salt_user in pillar['ad_salt_users'] %}
# SETTING FLAG VAR
{% set is_present = { 'flag': False } %}
@voxmaster
voxmaster / create-docker-tls.sh
Last active August 4, 2018 13:34 — forked from Stono/create-docker-tls.sh
Creating and setting up Docker for TLS (can be applied to ubuntu )
#!/bin/bash
# This script will help you setup Docker for TLS authentication.
# Run it passing in the arguement for the FQDN of your docker server
#
# For example:
# ./create-docker-tls.sh myhost.docker.com
#
# The script will also create a profile.d (if it exists) entry
# which configures your docker client to use TLS
#