Skip to content

Instantly share code, notes, and snippets.

View RafaelPalomar's full-sized avatar

Rafael Palomar RafaelPalomar

  • The Intervention Centre. Oslo University Hospital
  • Oslo
View GitHub Profile
#!/usr/bin/python
## rigidtransformation.py
#
# This file contains both, the functions to compute the rigid transformation
# between two sets of points and an illustrative example on how does all it works.
# This rigid transformation calculations are only concerned to the rotation and
# translation transformations, they do not consider the scaling transformations.
#
# This implementation is based on [1] and it works like the following:
@RafaelPalomar
RafaelPalomar / CMakeLists.txt
Created February 9, 2023 09:25
Simple CMakeLists.txt to test out globbing patterns
# This is a simple CMakeLists to test out globbing patterns
#
# .
# ├── CMakeLists.txt
# ├── file1.h
# ├── file2.h
# ├── file3.txx
# └── file4.txx
cmake_minimum_required(VERSION 3.20)
@RafaelPalomar
RafaelPalomar / argo-in-kind.md
Created November 19, 2021 06:20 — forked from darpr/argo-in-kind.md
"Argo Workflow" in `kind` Cluster

Argo in Kind

Play with "Argo Workflow" in your local kind cluster.

Prerequisites

The following instructions were tested in macOS Catalina (10.15.6), on 6 Sep 2020.

Docker Runtime

Ensure docker is installed and running.

K8s Client

@RafaelPalomar
RafaelPalomar / ssh-reverse-tunnel.org
Created April 1, 2020 19:37
Autotunnel with autossh #ssh #systemd #reverse #tunnel

SSH Reverse tunnels

Here we are interested to solve the following scenario:

actor User
node Proxy
node Server

User -> Proxy : SSH to Tunnel Port

Building Sabayon packages

Base Information

<geaaru> __aure__:
	 https://github.com/Sabayon/community-repositories/#structure-of-a-repository
								        [12:43]
<geaaru> for building we now use mottainaici

Building Sabayon packages

Base Information

<geaaru> __aure__:
	 https://github.com/Sabayon/community-repositories/#structure-of-a-repository
								        [12:43]
<geaaru> for building we now use mottainaici

Building Sabayon packages

Base Information

<geaaru> __aure__:
	 https://github.com/Sabayon/community-repositories/#structure-of-a-repository
								        [12:43]
<geaaru> for building we now use mottainaici
<geaaru> __aure__:
https://github.com/Sabayon/community-repositories/#structure-of-a-repository
[12:43]
<geaaru> for building we now use mottainaici
(https://mottainaici.github.io/docs/) and our tasks are available
there: https://github.com/Sabayon/sbi-tasks [12:44]
<geaaru> but there isn't a clean documentation for final users
<__aure__> I see. I will have a look :) [12:45]
<geaaru> we could avoid use of mottainaici with simple run of the
sabayon/builder and execute sark-localbuild script

Configuration of pass vault in a new machine

Importing the GPG key to decrypt the files

  1. Export the GPG key from an existing system (if you don’t have it in an ironkey)
@RafaelPalomar
RafaelPalomar / classa.py
Created February 3, 2020 15:58
Small snippet to use setters/gettes with dictionary-like variable acess #Python #Setters #Dictionary
class A():
def __init__(self, attr1):
self.attr1 = attr1
def __getitem__(self, key):
print('__getitem__ called')
return getattr(self, key)
def __setitem__(self, key, value):