Skip to content

Instantly share code, notes, and snippets.

View geokal's full-sized avatar

Giorgos Kal geokal

  • Fogus Innovetions & Services
  • Athens, Greece
View GitHub Profile

kubectl commands and tips&tricks for CKA, CKAD and CKS exams

Quickly retrieve imperative commands to create k8s resources.

Command: k run -h | grep '# ' -A2

When is it useful: copy/paste command to notepad, edit values and execute to create desired resource

Result: list of different ways to create k8s resources imperatively using kubectl

@karstengresch
karstengresch / Podman-on-MacOS.md
Created December 20, 2019 15:14 — forked from rbo/Podman-on-MacOS.md
Podman on Mac OS
$ export PATH=$(pwd):$PATH
$ podman-machine create box
Podman machine "box" already exists
$ podman-machine start box
Starting "box"...
@alexellis
alexellis / MULTIPASS_OPENFAAS.md
Last active December 5, 2022 03:39
Get k3s with OpenFaaS using k3sup and multipass

Get k3s with OpenFaaS using k3sup and multipass

multipass from Canoncial is like Docker Desktop, but for Ubuntu and works on MacOS, Linux and Windows.

Use-case:

We can get a Kubernetes cluster with k3s in a very short period of time. We can use this for workshops and building labs, and for R&D, including testing.

@bradtraversy
bradtraversy / node_redis_cache.js
Created August 20, 2019 12:55
Node.js & Redis Caching
const express = require('express');
const fetch = require('node-fetch');
const redis = require('redis');
const PORT = process.env.PORT || 5000;
const REDIS_PORT = process.env.PORT || 6379;
const client = redis.createClient(REDIS_PORT);
const app = express();
Backup:
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore:
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres
@Integralist
Integralist / Mature Engineers.md
Created July 18, 2018 07:46
[Mature Engineers] #mature #senior #developer #qualities #engineer

The following is copied verbatim from https://www.kitchensoap.com/2012/10/25/on-being-a-senior-engineer/ -- this gist is merely a partial backup of that excellent article.

For my own thoughts on the subject (which I still agree with having now read the above link) see my post called "The Perfect Developer Qualities": https://www.integralist.co.uk/posts/the-perfect-developer-qualities/

Mature engineers seek out constructive criticism of their designs.

Every successful engineer I’ve met, upon finishing up a design or getting ready for a project, will continually ask their peers questions along the lines of:

  • “What could I be missing?”
  • “How will this not work?”
@AndrewPix
AndrewPix / serializers.py
Last active January 3, 2024 14:23
Integrate django-rest-knox with django-rest-auth
from rest_framework import serializers
from rest_auth.serializers import UserDetailsSerializer
class KnoxSerializer(serializers.Serializer):
"""
Serializer for Knox authentication.
"""
token = serializers.CharField()
@dufferzafar
dufferzafar / mininetSocketTest.py
Last active November 1, 2018 03:04 — forked from bocon13/mininetSocketTest.py
Difference from the fork: PEP8 + Fix "Could not find a default OpenFlow controller" issue
#!/usr/bin/python
from mininet.node import OVSController
from mininet.topo import SingleSwitchTopo
from mininet.net import Mininet
from mininet.log import lg
from mininet.cli import CLI
import functools
from channels.handler import AsgiRequest
from rest_framework.exceptions import AuthenticationFailed
from rest_framework.settings import api_settings
authenticators = [auth() for auth in api_settings.DEFAULT_AUTHENTICATION_CLASSES]
@ibrahimlawal
ibrahimlawal / LC_CTYPE.txt
Created February 27, 2017 07:02 — forked from jampajeen/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8