Skip to content

Instantly share code, notes, and snippets.

@avoidik
avoidik / freeipa.py
Created June 13, 2020 18:10 — forked from chmeliuk/freeipa.py
FreeIPA web call from Python
import kerberos
import sys
import os
from requests.auth import AuthBase
import requests
import json
class IPAAuth(AuthBase):
def __init__(self, hostname, keytab):
self.hostname = hostname
"""Provides methods around syncing and usage of AWS s3 buckets as local caches rather than individually
downloading every file"""
import os
import shutil
import boto3 as boto
import multiprocessing
import copy
import hashlib
@avoidik
avoidik / rkind.sh
Created June 17, 2020 05:29 — forked from anapsix/rkind.sh
Rancher in KIND (Rancher in Kubernetes-in-Docker)
#!/usr/bin/env bash
#
# RKIND is a naive helper script to start KIND and Rancher Management Server
#
set -u
set -o pipefail
RANCHER_CONTAINER_NAME="rancher-for-kind"
RANCHER_HTTP_HOST_PORT="$((RANDOM % 9000 + 30000))"
@avoidik
avoidik / README.md
Last active October 1, 2020 18:31 — forked from ibuildthecloud/README.md
k3s on WSL2

Instructions to hack up WSL2 on Windows 10 Build 18917 to run k3s (Kubernetes) and rio

Install WSL2

https://docs.microsoft.com/en-us/windows/wsl/wsl2-install

I already had Ubuntu-18.04 installed in wsl 1. So I just did wsl --set-version Ubuntu-18.04 2

Compile Kernel

Using Ubuntu 18.04 (I'm sure any distro will work), inside WSL2 download https://thirdpartysource.microsoft.com/download/Windows%20Subsystem%20for%20Linux%20v2/May%202019/WSLv2-Linux-Kernel-master.zip and extract to a folder. The latest version of the kernel source is available at (https://github.com/microsoft/WSL2-Linux-Kernel)

@avoidik
avoidik / build.sh
Created October 1, 2020 16:36 — forked from sheeley/build.sh
Terraform API Gateway Lambda setup
#! /usr/bin/env bash
GOOS=linux GOARCH=amd64 go build -o main main.go
zip main.zip main
@avoidik
avoidik / build-openssl-win.bat
Created December 13, 2020 21:10 — forked from gorlak/build-openssl-win.bat
A simple batch script to build MT/MTd/MD/MDd openssl static libs on windows
@echo off
setlocal
if "%VisualStudioVersion%" equ "" echo Please run this script from a Visual Studio command prompt for the compiler you want to use
if "%VisualStudioVersion%" equ "" exit /b 1
:: make perl.exe available via %PATH%
set PATH=%PATH%;%~dp0..\..\..\game\bin\perl\bin
@avoidik
avoidik / 00-setup.md
Last active August 27, 2022 00:28 — forked from BusterNeece/00-setup.md
My WSL2 Ubuntu 20.04 Environment

My local Ubuntu 20.04 WSL2 setup.

Enable and Install WSL2

From Windows, as admin:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Make sure the openssl pkcs11 engine provided by OpenSC/libp11 can talk to your PKI card:

  $ openssl engine pkcs11 -t -c -pre MODULE_PATH:/path/to/your/opensc-pkcs11-plugin-module.so
  (pkcs11) pkcs11 engine
  [Success]: MODULE_PATH:/path/to/your/OpenSC-pkcs11-plugin-module.so
  [RSA]
 [ available ]
@avoidik
avoidik / jitsi-meet-multi-server.md
Created March 8, 2021 10:26 — forked from facsiaginsa/jitsi-meet-multi-server.md
This tutorial is for jitsi-meet installation using 2 server or more. The main server will contain jitsi-meet react source code, prosody, nginx, and jicofo. The videobridge will be installed seperatelly on the second server and so on.

How to Install Jitsi Meet with Multi Server Configuration

This tutorial is for jitsi-meet installation using 2 server or more. The main server will contain jitsi-meet react source code, prosody, nginx, and jicofo. The videobridge will be installed seperatelly on the second server and so on.

Prerequisite

  1. Minimum 2 server with 1 IP Public each
  2. Ubuntu 18.04

Sudo Privileges

Before start we make sure that we will have no permission issue on the installation.

@avoidik
avoidik / wsl2-network.ps1
Created April 1, 2021 10:42 — forked from daehahn/wsl2-network.ps1
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}