Skip to content

Instantly share code, notes, and snippets.

@livenson
livenson / restore_rancher2_agents.md
Created January 11, 2022 06:01 — forked from superseb/restore_rancher2_agents.md
Restore Rancher 2 cluster/node agents on clusters

Restore Rancher 2 cluster/node agents on clusters

This is an unsupported scenario, see rancher/rancher#14731 when there is an official solution.

When cattle-cluster-agent and/or cattle-node-agent are accidentally deleted, or when server-url/cacerts are changed.

Generate definitions

  • Generate API token in the UI (user -> API & Keys) and save the Bearer token
  • Find the clusterid in the Rancher UI (format is c-xxxxx), its in the address bar when the cluster is selected
@livenson
livenson / README.md
Created November 18, 2020 10:55 — forked from superseb/README.md
Retrieve kubeconfig from RKE or Rancher 2 custom cluster controlplane node for RKE v0.1.x and Rancher v2.0.x and Rancher v2.1.x
@livenson
livenson / face.py
Last active July 12, 2018 12:43
opencv poc
import cv2
from time import sleep
import dlib
from scipy.spatial import distance as dist
import numpy as np
def eye_aspect_ratio(eye):
# compute the euclidean distances between the two sets of
# vertical eye landmarks (x, y)-coordinates
@livenson
livenson / todokuwiki.pl
Last active August 29, 2015 13:57
A script for converting docx files into dokuwiki syntax
#!/usr/bin/perl
# convert docx to dokuwiki
# based on https://www.dokuwiki.org/tips:docpdf2dokuwiki
# requirements: libreoffice, HTML::WikiConverter
# running: ./todokuwiki.pl path/to/file/docx
use HTML::WikiConverter;
@livenson
livenson / github_issues_to_csv.rb
Created April 5, 2012 12:39 — forked from henare/github_issues_to_csv.rb
Exports Github issues to CSV so it can be imported into Jira
require 'json'
require 'open-uri'
require 'csv'
require 'date'
# Github credentials to access your private project
USERNAME="myusername"
PASSWORD="mypassword"
# Project you want to export issues from
from __future__ import absolute_import
from zope.interface import classImplements
from grokcore.component import Adapter, context, baseclass
from twisted.internet import reactor
from func.overlord.client import Overlord
from func import jobthing
from opennode.oms.backend.operation import IFuncInstalled
from opennode.oms.backend.operation import IGetComputeInfo