Skip to content

Instantly share code, notes, and snippets.

View goffinet's full-sized avatar

goffinet

View GitHub Profile
@goffinet
goffinet / openshift-cheatsheet.md
Created January 17, 2024 18:52 — forked from rafaeltuelho/openshift-cheatsheet.md
My Openshift Cheatsheet

My Openshift Cheatsheet

Project Quotes, Limits and Templates

  • Cluster Quota
oc create clusterquota env-qa \
    --project-label-selector environment=qa \
    --hard pods=10,services=5
    
oc create clusterquota user-qa \
@goffinet
goffinet / ansible-playbook-example-windows.md
Created March 8, 2023 18:51 — forked from devops-school/ansible-playbook-example-windows.md
15 Ansible Playbooks Example for Windows Administration

1. Copying Files

---
- hosts: win

  tasks:
  - name: Copy File
    win_copy:
      src: C:\output.pdf
@goffinet
goffinet / dnsmasq OS X.md
Created October 7, 2022 18:29 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@goffinet
goffinet / crc-on-google-cloud.md
Created October 2, 2022 13:06 — forked from pottava/crc-on-google-cloud.md
CodeReady Containers (crc)

Setup a CRC instance on Google Cloud

1. Create a VM

vm_name=
gcloud compute instances create \
    "${vm_name}" --zone asia-northeast1-c \
    --image-project=ubuntu-os-cloud --image-family=ubuntu-2004-lts \
    --machine-type "n1-custom-14-36864" --boot-disk-size 300G --boot-disk-type pd-standard \
@goffinet
goffinet / remote_crc.md
Created September 6, 2022 08:05 — forked from tmckayus/remote_crc.md
Running 'crc' on a remote server

Overview: running crc on a remote server

This document shows how to deploy an OpenShift instance on a server using CodeReady Containers (crc) that can be accessed remotely from one or more client machines (sometimes called a "headless" instance). This provides a low-cost test and development platform that can be shared by developers. Deploying this way also allows a user to create an instance that uses more cpu and memory resources than may be available on his or her laptop.

While there are benefits to this type of deployment, please note that the primary use case for crc is to deploy a local OpenShift instance on a workstation or laptop and access it directly from the same machine. The headless setup is configured completely outside of crc itself, and supporting a headless setup is beyond the mission of the crc development team. Please do not ask for changes to crc to support this type of deployment, it will only cost the team time as they politely decline :)

The instructions here were tested with F

This file has been truncated, but you can view the full file.
<?xml version="1.0"?>
<ds:data-stream-collection xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:cpe-dict="http://cpe.mitre.org/dictionary/2.0" xmlns:cpe-lang="http://cpe.mitre.org/language/2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:ind="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:linux="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:ocil="http://scap.nist.gov/schema/ocil/2.0" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:unix="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:xccdf-1.2="http://checklists.nist.gov/xccdf/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_org.open-scap_collection_from_xccdf_ssg-rhel7-xccdf-1.2.xml" schematron-version="1.2">
<ds:data-stream id="scap_org.ope
@goffinet
goffinet / SCAP-CentOS-NotApplicable.md
Created November 25, 2021 07:29 — forked from gregelin/SCAP-CentOS-NotApplicable.md
Explanation of SCAP, CentOS and tests Not Applicable

This note explains the common issue of "notapplicable" results when running openSCAP and SCAP-Security-Guide on CentOS.

SCAP seems like it should be easy because it is "just XML". Then you dig into looking for a test and it gets confusing fast. So it is good to have some background.

SCAP (Security Content Automation Protocol) is actually a set of multiple standards and specifications that are used together to enable automatically testing hundreds of nerd settings. Let me emphasize that: SCAP is not a single XML specification -- SCAP is multiple standards and specs. Whenever you give "SCAP Content" to a scanner to check a system configurations you are giving the scanner multiple XML files representing multiple standards.

@goffinet
goffinet / check_env_vars.sh
Created October 31, 2021 08:54
Bash snippets
#!/bin/bash
# Check if environment variables are are set.
# https://stackoverflow.com/a/65396324
varlist="
MAIL_TO
MAIL_ADMIN
SCW_DEFAULT_PROJECT_ID
SCW_DEFAULT_ORGANIZATION_ID
SCW_DEFAULT_REGION
@goffinet
goffinet / installOpenSSH.ps1
Last active November 8, 2021 22:31 — forked from Kalki5/installOpenSSH.ps1
OpenSSH on Windows server 2016 - Powershell script
Set-Location -Path 'C:\Program Files'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri 'https://github.com/PowerShell/Win32-OpenSSH/releases/download/V8.6.0.0p1-Beta/OpenSSH-Win64.zip' -OutFile openssh.zip
Expand-Archive 'openssh.zip' -DestinationPath 'C:\Program Files\'
$oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path
$newpath = "$oldpath;C:\Program Files\OpenSSH-Win64"
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newPath
@goffinet
goffinet / tuto.sh
Last active March 22, 2021 20:18 — forked from Vincent-CIRCL/tuto.sh
For-Dummy tutorial for Sphinx documentation of a Python project
# Sources :
https://goldilocks.readthedocs.io/en/latest/source/goldilocks.html#module-goldilocks.strategies
https://samnicholls.net/2016/06/15/how-to-sphinx-readthedocs/
https://gisellezeno.com/tutorials/sphinx-for-python-documentation.html
http://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html
https://stackoverflow.com/questions/2701998/sphinx-autodoc-is-not-automatic-enough
https://github.com/MISP/PyMISP/blob/master/docs/source/conf.py
https://raw.githubusercontent.com/MISP/PyMISP/master/docs/source/index.rst
https://raw.githubusercontent.com/MISP/PyMISP/master/docs/source/modules.rst
https://stackoverflow.com/questions/13516404/sphinx-error-unknown-directive-type-automodule-or-autoclass/17004855