Skip to content

Instantly share code, notes, and snippets.

@mpas
mpas / running-rancher-on-k3s-using-k3d.md
Last active May 9, 2023 08:00
Running Rancher on K3S using K3D

Running Rancher on K3S using K3D

Requirements

  • Colima installed
    • When using Colima make sure to point to the correct docker socket using an export
      export DOCKER_HOST="unix://${HOME}/.colima/default/docker.sock
  • K3D installed
  • Helm installed
@mpas
mpas / Emacs - Insert image from clipboard into org file
Last active March 29, 2021 12:13
Emacs - inserts image from the clipboard in org file, by prompting the user for a filename and storing relative in .images
;; Overview
;; --------
;; Inserts an image from the clipboard by prompting the user for a filename.
;; Default extension for the pasted filename is .png
;; A ./images directory will be created relative to the current Org-mode document to store the images.
;; The default name format of the pasted image is:
;; filename: <yyyymmdd>_<hhmmss>_-_<image-filename>.png
### Keybase proof
I hereby claim:
* I am mpas on github.
* I am marcopas (https://keybase.io/marcopas) on keybase.
* I have a public key ASAbEBSsSCQ_6MA52PEXrLdOBpkhAyLYM4ujIUEtthy3LQo
To claim this, I am signing this object:
@mpas
mpas / gist:58497115057068f15751
Last active November 2, 2023 06:58
Groovy script to convert Csv to Json
import groovy.json.JsonOutput
/**
* A simple CSV file to Json converter
*
* The CSV file is expected to have a header row to identify the columns. These
* columns will be used to generate the corresponding Json field.
*
* @author Marco Pas
*/
@mpas
mpas / gist:d00b3b29235b2a49e810
Last active August 29, 2015 14:16
Simple Csv to JSON converter in Groovy
import groovy.json.JsonOutput
/**
* A simple CSV file to Json converter
*
* The CSV file is expected to have a header row to identify the columns. These
* columns will be used to generate the corresponding Json field.
*
* @author Marco Pas
*/