Skip to content

Instantly share code, notes, and snippets.

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 / 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
@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 / 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 / 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 / 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))"
"""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 / 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
@avoidik
avoidik / user.js
Created May 16, 2020 18:12 — forked from AetherEternity/user.js
Silent firefox
// Mozilla User Preferences
// To change a preference value, you can either:
// - modify it via the UI (e.g. via about:config in the browser); or
// - set it within a user.js file in your profile (create it if it doesn't exist).
//
// Profile folder location on different systems:
// Windows: C:\Users\<username>\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxxx.default
// Mac OS X: Users/<username>/Library/Application Support/Firefox/Profiles/xxxxxxxx.default
// Linux: /home/<username>/.mozilla/firefox/xxxxxxxx.default
@avoidik
avoidik / README.md
Last active August 28, 2020 10:57 — forked from nickbudi/README.md
Cygwin git compatibility with VS Code (or other Windows programs) using cygpath

Cygwin Git + VS Code compatibility

Thanks and credit to mattn and ferreus on GitHub.

Check out wslpath if you're using the Windows Subsystem for Linux.