Skip to content

Instantly share code, notes, and snippets.

@thieryl
thieryl / README Raspberry Pi from SD to USB.md
Last active April 5, 2024 06:43 — forked from avoidik/README.md
Migrate Raspberry Pi from SD to USB

Raspberry Pi from SD to USB

How to switch over from SD-card to USB-attached device (USB thumbstick, USB enclosed SSD or HDD, etc.) to have more durable storage option.

Steps

  1. Connect USB device to your RPI

  2. Make sure USB device visible by the system

Ansible

In an ideal world, all of your configuration information would be stored as Ansible variables, in the various places that Ansible lets you define variables (e.g., the vars section of your playbooks, files loaded by vars_files , files in the host_vars or group_vars directory).

Alas, the world is a messy place, and sometimes a piece of configuration data we need lives somewhere else. Maybe it’s in a text file or a .csv file, and we don’t want to just copy the data into an Ansible variable file because now you have to maintain two copies of the same data, and you believe in the DRY 2 principle. Or maybe the data isn’t maintained as a file at all; it’s maintained in a key-value storage service such as etcd.

Ansible has a feature called lookups that allows you to read i

@thieryl
thieryl / markdown-details-collapsible.md
Created August 17, 2023 06:49 — forked from isweluiz/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets

Rundeck with active directory authentication

rundeck-auth

Create A bind User and the Security Groups in Active Directory Before integrating Rundeck with Active Directory, we need to create a bind User and two security groups called rundeck_administrators and rundeck_users. Finally, add the appropriate users into those groups before proceeding.

Create jaas-activedirectory.conf file

@thieryl
thieryl / README.md
Created March 27, 2023 07:13 — forked from GusAntoniassi/README.md
Configure autocompletion to kubectl with zsh

kubectl with ZSH (oh-my-zsh)

How to configure

Use the following commands to add the kubectl autocomplete to zsh:

mkdir -p ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete/
kubectl completion zsh > ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete/kubectl-autocomplete.plugin.zsh
@thieryl
thieryl / README-tomcat-as-systemd-service.md
Created July 28, 2022 10:09 — forked from drmalex07/README-tomcat-as-systemd-service.md
An example configuration for Tomcat as systemd service. #tomcat #systemd #systemd.service

README

Let Tomcat is download and installed under /opt/tomcat. Also, let tomcat be a non-provileged user under which the server will be running.

We assume that we keep server's binaries under /opt/tomcat and we will create a server instance named foo under /var/tomcat/ (carrying its own conf, logs, webapps, work, lib directories). See also https://dzone.com/articles/running-multiple-tomcat.

Create a template service unit file at /etc/systemd/system/[email protected]:

@thieryl
thieryl / Samba Domain Controller.md
Created January 4, 2022 05:14 — forked from esummers/Samba Domain Controller.md
Samba Domain Controller on a Raspberry Pi

Running a Samba 4.x Domain Controller on a Raspberry Pi

If you don't have a Windows server available for testing, a Raspberry Pi makes a great test environment. It works with Mac AD Binding, Apple Enterprise Connect, and the Mac Kerberos SSO Extension.

Configuring a Domain Controller on Rasbian or other Debian-based Linux distribution:

  1. Install Rasbian. Use NOOBS if you are new to Raspberry Pi at https://www.raspberrypi.org/downloads/. Optionally enable SSH or VNC support in Raspbian settings menu to remote in to the machine.

  2. Install Samba and related packages. Some packages may launch setup tools. Skip through the Kerberos configuration with defaults. We will be deleting the Kerberos configuration in a later step.

@thieryl
thieryl / keepalived.conf
Created September 18, 2021 08:37 — forked from gasgasalterego/keepalived.conf
KeepAlived configuration for automatic switch of virtual IP between two MySQL instances configured in Master/Slave and with circular replica.
##############################################################################################################################################
# This configuration needs 2 fails in order to change from current state to FAULT state and needs 2 success to change from BACKUP state to
# MASTER state.
#
# !!!MOST IMPORTANT!!!
# BEFORE keepalived can be started this file must be poperly edited (see HOW TO section below)
#
# HOW TO
# 1 - Check all the parameters of the script(s) in the "vrrp_script check_mysql" section below are correct
# 2 - unicast_src_ip (IP of the local machine) must be manually edited
@thieryl
thieryl / 001_begin_pyrhon.md
Created August 7, 2018 08:43
[PYthon Daily]

11 Beginner Tips for Learning Python Programming – Real Python

We are so excited that you have decided to embark on the journey of learning Python! One of the most common questions we receive from our readers is "What's the best way to learn Python?"

I believe that the first step in learning any programming language is making sure that you understand how to learn. Learning how to learn is arguably the most critical skill involved in computer programming.

Why is knowing how to learn so important? The answer is simple: as languages evolve, libraries are created, and tools are upgraded. Knowing how to learn will be essential to keeping up with these changes and becoming a successful programmer.

In this article, we will offer several learning strategies that will help jump start your journey of becoming a rockstar Python programmer!

@thieryl
thieryl / iterm2.md
Created July 25, 2018 07:03
[Iterm2] Iterm2 shortcuts #linux

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
Go to Split Pane by Order of Use + ] , + [