Skip to content

Instantly share code, notes, and snippets.

@ivaravko
ivaravko / keybase.md
Created January 7, 2020 19:31
keybase

Keybase proof

I hereby claim:

  • I am ivaravko on github.
  • I am ivaravko (https://keybase.io/ivaravko) on keybase.
  • I have a public key whose fingerprint is F025 1532 85E8 313B 0FCC 3D4F 441C 2BED C047 637F

To claim this, I am signing this object:

@ivaravko
ivaravko / logs
Created May 8, 2019 08:40
Velero logs
time="2019-05-08T08:30:38Z" level=info msg="Checking for expired DeleteBackupRequests" controller=backup-deletion logSource="pkg/controller/backup_deletion_controller.go:449"
time="2019-05-08T08:30:38Z" level=info msg="Done checking for expired DeleteBackupRequests" controller=backup-deletion logSource="pkg/controller/backup_deletion_controller.go:477"
time="2019-05-08T08:33:53Z" level=info msg="Removing existing deletion requests for backup" backup=grafana-01 controller=backup-deletion logSource="pkg/controller/backup_deletion_controller.go:400" name=grafana-01-mk7cb namespace=velero
time="2019-05-08T08:33:53Z" level=info msg="Removing PV snapshots" backup=grafana-01 controller=backup-deletion logSource="pkg/controller/backup_deletion_controller.go:248" name=grafana-01-mk7cb namespace=velero
time="2019-05-08T08:33:53Z" level=info msg="Removing restic snapshots" backup=grafana-01 controller=backup-deletion logSource="pkg/controller/backup_deletion_controller.go:295" name=grafana-01-mk7cb namespace=velero
time
@ivaravko
ivaravko / x-factor-cnfs.md
Created September 21, 2018 20:09 — forked from fkautz/x-factor-cnfs.md
X-Factor CNFs

The community is currently in the process of defining Cloud-Native Network Functions (CNFs). Due to the differences between the current modern architecture and cloud-native environment, many questions will arise about how to create, consume, operate, monitor and scale CNFs. As CNFs gain in popularity, it will become increasingly important to have a set of guidelines to help the community maximize the benefit received from running in the new Cloud-Native environment.

When cloud-native arrived, it was often unclear how web applications should be designed or rearchitected to make use of cloud-native infrastructure. Many mistakes were repeated due to a lack of guidance. In response, Adam Wiggins and others created a methodology known as 12 Factor Apps. 12 factor apps guide developers towards building applications capable of taking advantage of cloud-native infrastructure. These properties include but are not limited to:

  • Easier on-boarding for developers
  • Maximize portability
  • Deploy on modern cloud platfor
@ivaravko
ivaravko / terraform-kubernetes-docker-macos.md
Last active November 10, 2024 03:55
The simple Terraform and Kubernetes with Docker on macOS

If you'd like to experiment with Terraform and Kubernetes on macOS locally, a great provider for doing so is the Kubernetes provider. You can get set up in a few simple steps, like so:

1. Install Docker

Install Docker for Mac if you have not already.

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ci-robot
namespace: search
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: ci-robot
subjects:
# HELP engine_daemon_container_actions_seconds The number of seconds it takes to process each container action
# TYPE engine_daemon_container_actions_seconds histogram
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.005"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.01"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.025"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.05"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.1"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.25"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="0.5"} 1
engine_daemon_container_actions_seconds_bucket{action="changes",le="1"} 1
@ivaravko
ivaravko / gist:351405f96974422e6c7e
Created July 16, 2015 13:02
mongo replica set connection
connection = Mongo::MongoReplicaSetClient.new(
["replica.host.ru:27022", "master.host.ru:27022"], read: :secondary_preferred, logger: Rails.logger
)
db = connection.db('admin')
db.authenticate('reader', 'somepassword')
$MONGO = connection.db('test')
1. Open a command prompt and navigate to /etc/nginx/ssl
2. issue "openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr"
3. Get your certificate - Go to your certificate authority and give them the CSR
4. copy your new crt to the /etc/nginx/ssl and give it read priveledges
5. reconfigure your nginx.conf, here is mine. The first part redirects 80 to 443, the second part listens to 443 and is optimized to return Ruby on Rails application requests using gzip and unicorn.

Введение

Начать стоит отсюда. Не пугайтесь то, что это книга по незнакомой OS, эти термины практически везде одинаковые и здесь они изложены в понятной для начинающих форме.

http://www.qnx.com/developers/docs/6.4.1/neutrino/getting_started/s1_procs.html

Прочесть нужно треть главы до подраздела "Starting a process", если С не пугает, читайте полностью. После прочтения вы будете понимать, что такое process, thread, mutex, priorites, semaphores, scheduler, contex-switch, kernel states.

Ruby