Skip to content

Instantly share code, notes, and snippets.

Avatar
🦃
Working on my courses

Ondrej Sika ondrejsika

🦃
Working on my courses
View GitHub Profile
View keybase.md

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:

View next.config.js
module.exports = {
exportPathMap: async function(defaultPathMap) {
return {
'/': { page: '/' },
'/about-me': { page: '/about-me' },
};
}
};
const withPages = require('@primer/next-pages/plugin')
View Ansible Let's Encrypt Nginx setup
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 Mar 19, 2019 — forked from ubergesundheit/readme.md
systemd traefik.service
View readme.md

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:

View .gitlab-ci.yml
image: ondrejsika/ci
variables:
COMPOSE_PROJECT_NAME: p$CI_PIPELINE_ID
COMPOSE_FILE: docker-compose.yml:docker-compose-test.yml
stages:
- build
- test
@ondrejsika
ondrejsika / 01
Created Jan 2, 2019
Docker Installation
View 01
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:2557e3c07ed1e38f26e389462d03ed943586f744621577a99efb77324b0fe535
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
View yamldb
from git import Repo
from git.util import Actor
import yaml
import os
class GitYamlDb(object):
def __init__(self, data_dir):
self._data_dir = data_dir
View .gitlab-ci.yml
variables:
NAME: skolenidockercz
PROD_URL: skoleni-docker.cz
SSH: sshpass -e ssh -o StrictHostKeyChecking=no root@bar.l.oxs.cz -p 22202
TRAEFIK_DEV: -l traefik.frontend.rule=Host:$NAME-$CI_COMMIT_REF_NAME.b.h4y.cz -l traefik.port=80 -l traefix.port=443 -l traefik.frontend.entryPoints=http,https
TRAEFIK_PROD: -l traefik.frontend.rule=Host:$PROD_URL,www.$PROD_URL -l traefik.port=80 -l traefix.port=443 -l traefik.frontend.entryPoints=http,https
CONTAINER_DEV: dev-$NAME-$CI_COMMIT_REF_NAME
CONTAINER_PROD: prod-$NAME
View pgp
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.1.5
Comment: Hostname: pgp.mit.edu
mQINBFMO/9EBEADSbss+Ajptn0SFE/52kOjNN90vMzyprepsiFT8p23iQSb+vQQoBuCUF4Jw
wdHq0kkIpVU0LUwnbgEbCCA8T5Hf+Zfdx19v5lNMOhVrOQT6aqvxLGMmoLsOZ6ZhQgunlVHe
Gzi60j6SNAWmHvpydoxYCcsKAGa7tkDAnCfxHG5W6QFTZtmVrdMXD92cZakJx0zJuKtsUBpF
yN5+FRixLRNopTxnQ1uRiGomczj9sdIXTrvKIdv9mfX4SJNvRCvNtIHvXaokxcibpOrKQpSM
7mm2zkeJrmtVJpZAfYCwl6/6daTgzpuBaH0H0d2tou98viIzJwHjCWBZnythwWW6W4hrcJv4
W+cpG70rMPNEmGjMJEwD8HZ4Voj6GR3zibMUMaMR6GjW1lF6mLSYSYztnaGR6EHlw/Ryosvo
@ondrejsika
ondrejsika / README.md
Created Jun 28, 2017
MongoDB Cheat Sheet
View README.md
Ondrej Sika <ondrej@ondrejsika.com>

Database

Select Database

use DATABASE_NAME
You can’t perform that action at this time.