Skip to content

Instantly share code, notes, and snippets.

View ondrejsika's full-sized avatar
🦃
Working on my courses

Ondrej Sika ondrejsika

🦃
Working on my courses
View GitHub Profile
@ondrejsika
ondrejsika / README.md
Created June 28, 2017 07:04
MongoDB Cheat Sheet
Ondrej Sika <ondrej@ondrejsika.com>

Database

Select Database

use DATABASE_NAME
terraform {
required_providers {
keycloak = {
source = "mrparkers/keycloak"
}
}
}
provider "keycloak" {
client_id = "admin-cli"
@ondrejsika
ondrejsika / rke2-commands.md
Created August 4, 2022 08:57 — forked from superseb/rke2-commands.md
RKE2 commands

RKE2 commands

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
. /complete-alias/complete_alias
source <(kubectl completion bash)
source <(helm completion bash)
source "/kube-ps1/kube-ps1.sh"
export KUBE_PS1_SYMBOL_ENABLE=false
export PS1='$(kube_ps1)'$PS1
# kubectl
version: "3.7"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
environment:
discovery.type: single-node
ports:
- 9200:9200
kibana:
image: docker.elastic.co/kibana/kibana:7.6.2

Keybase proof

I hereby claim:

  • I am ondrejsika on github.
  • I am ondrejsika (https://keybase.io/ondrejsika) on keybase.
  • I have a public key whose fingerprint is B000 780A 20CF 1013 F7A5 9081 775D 8A02 0903 EF6B

To claim this, I am signing this object:

module.exports = {
exportPathMap: async function(defaultPathMap) {
return {
'/': { page: '/' },
'/about-me': { page: '/about-me' },
};
}
};
const withPages = require('@primer/next-pages/plugin')
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
@ondrejsika
ondrejsika / readme.md
Created March 19, 2019 19:42 — forked from ubergesundheit/readme.md
systemd traefik.service

systemd Service Unit for Traefik

Adapted from traefik systemd Service Unit

The provided file should work with systemd version 219 or later. It might work with earlier versions. The easiest way to check your systemd version is to run systemctl --version.

Instructions

We will assume the following:

image: ondrejsika/ci
variables:
COMPOSE_PROJECT_NAME: p$CI_PIPELINE_ID
COMPOSE_FILE: docker-compose.yml:docker-compose-test.yml
stages:
- build
- test