Skip to content

Instantly share code, notes, and snippets.

@GiovanniGrieco
GiovanniGrieco / podman_on_wsl2.md
Last active April 19, 2024 16:26
Install Podman on WSL2

Install Podman on Windows Subsystem for Linux 2 (WSL2)

This guide allows a safe and rootless installation of Podman on WSL2. Head over the hyperlinks to discover more about these two wonderful technologies!

This guide assumes that Debian 11 "bullseye" is installed as WSL2 base OS. To do it, simply open your Windows Powershell console under Admin rights and run

PS> wsl install -d Debian

After installation, please check that you are under the latest Debian. If not, please upgrade it.

@candoom
candoom / docker-nfs-volumes.md
Created March 23, 2021 19:34 — forked from ruanbekker/docker-nfs-volumes.md
NFS Volumes with Docker Swarm

Create NFS Volumes:

Creating the NFS Volume:

$ docker volume create --driver local \
  --opt type=nfs \
  --opt o=addr=192.168.1.115,uid=1000,gid=1000,rw \
  --opt device=:/mnt/volumes/mysql-test \
  mysql-test-1
#!/bin/bash
# Proof of concept of running playbooks in AWX and recording them in ARA
# From a vanilla CentOS8 image: https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.1.1911-20200113.3.x86_64.qcow2
# Add local bin directory to PATH so we can use things installed with "pip install --user"
export PATH=$PATH:~/.local/bin
dnf -y update
# Install Ansible and Python3
@superseb
superseb / create_user_and_kubeconfig_rancher2.sh
Last active November 1, 2023 18:51
Create local user and generate kubeconfig in Rancher 2 via API
#!/bin/bash
RANCHERENDPOINT=https://your_rancher_endpoint/v3
# The name of the cluster where the user needs to be added
CLUSTERNAME=your_cluster_name
# Username, password and realname of the user
USERNAME=username
PASSWORD=password
REALNAME=myrealname
# Role of the user
GLOBALROLE=user
var casper, states, toTitleCase, url;
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);
};
toTitleCase = function(str) {
return str.replace(/\w\S*/g, function(txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
});
@coderofsalvation
coderofsalvation / xdebug
Last active October 1, 2015 04:08
xdebug - a cmdline utility to trigger php xdebugging (settings) and to easify automated, multi-user profiling and tracing.
#!/bin/bash
#
# XDEBUG.sh : a cmdline utility to test xdebug settings,
# and to easify automated, multi-user profiling,debugging and tracing in live-environments
#
# Copyright 2012, Leon van Kammen (Coder of Salvation), All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
#
@mattrude
mattrude / changepassword.php
Created October 31, 2010 23:49
LDAP PHP Change Password Page
<?php
/**
* LDAP PHP Change Password Webpage
* @author: Matt Rude <http://mattrude.com>
* @website: http://technology.mattrude.com/2010/11/ldap-php-change-password-webpage/
*
*
* GNU GENERAL PUBLIC LICENSE
* Version 2, June 1991