Skip to content

Instantly share code, notes, and snippets.

View andreichernov's full-sized avatar

andreichernov andreichernov

View GitHub Profile
Tips to pass Certified Kubernetes Application Developer (CKAD) exam
Getting started Kubernetes :-
a) Book : Kubernetes: Up & Running
b) Practice practice & practice with CKAD Exercises
the Best Kubernetes CKAD sample exercises which cover all parts of the exam https://github.com/dgkanatsios/CKAD-exercises.
c) Again, the best practice is use kubectl command well. Use kubectl to create resources (such as deployment, service, cronjobs, secret, configmap…) instead of creating them from manifest files.
Incase you have to edit manifest, use dry-run and -o yamlto save yaml file then edit manifest files.
d) Kubernetes in Action by Mario Luksa. The book is the holy bible of Kubernetes, and it basically answer all questions you may have ;
e) Whether or not you use Kubernetes at work, you should still provision your own cluster somewhere and play with it.
@andreichernov
andreichernov / run_pihole_docker.sh
Created August 16, 2019 07:21 — forked from xenithorb/run_pihole_docker.sh
My preferred way of running a standalone pihole on an atomic host instance.
NAME=pihole
TERM=xterm-256color
TAG='latest'
TZ="America/New_York"
DNS1=10.0.0.1
DNS2=10.0.0.1
IP=10.0.0.14
docker pull diginc/pi-hole:${TAG} &&
docker rm -f ${NAME}
@andreichernov
andreichernov / noip2.service
Created April 28, 2019 20:26 — forked from NathanGiesbrecht/noip2.service
Systemd Service file for no-ip.com dynamic ip updater
# Simple No-ip.com Dynamic DNS Updater
#
# By Nathan Giesbrecht (http://nathangiesbrecht.com)
#
# 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin)
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file
# 3) Copy this file noip2.service to /etc/systemd/system/
# 4) Execute `sudo systemctl enable noip2`
# 5) Execute `sudo systemctl start noip2`
#
@andreichernov
andreichernov / latency.txt
Created April 26, 2017 20:20 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@andreichernov
andreichernov / объявление класса
Created April 30, 2015 10:25
Для объявления класса в C++ служит ключевое слово class
// пример объявления класса
class Date
{
public:
void Next();
void Print() const;
private:
int year, month, day;
};
@andreichernov
andreichernov / полиморфизм
Created April 30, 2015 10:21
Полиморфизм - явление, при котором классы-потомки могут изменять реализацию метода класса-предка, сохраняя его интерфейс
// Полиморфизм - классы-потомки могут изменять реализацию метода класса-предка, сохраняя его интерфейс
class Shape
{
public:
virtual ~Shape()
{
}
virtual double GetArea() const = 0;
};
@andreichernov
andreichernov / наследование
Created April 30, 2015 09:58
Наследование позволяет описать новый класс на основе уже существующего родительского (базового) класса
class Plane
{
public:
void TakeOff();
void Fly();
void Land();
private:
double m_fuel;
};
class IntStack
{
public:
void Push(int value);
int Pop();
bool isEmpty() const;
private:
// здесь располагаются данные
// необходимые для реализации стека целых чисел
@andreichernov
andreichernov / function_overload_example
Created April 30, 2015 08:32
пример перегрузки
#include <stdio.h>
void Print(int number)
{
printf("%d", number);
}
void Print(double number)
{
printf("%.15f", number);
}