Skip to content

Instantly share code, notes, and snippets.

View abduakhatov's full-sized avatar
🏠
Working from home

Shohruh abduakhatov

🏠
Working from home
View GitHub Profile
@tanmay-bhat
tanmay-bhat / Exiting due to RSRC_INSUFFICIENT_CORES: Requested cpu count 2 is greater than the available cpus of 1.md
Created June 26, 2022 13:06
solution : ⛔ Exiting due to RSRC_INSUFFICIENT_CORES: Requested cpu count 2 is greater than the available cpus of 1

If you face the below error message while starting minikube with podman as the driver, then follow the below solution :

Error message : Exiting due to RSRC_INSUFFICIENT_CORES: Requested cpu count 2 is greater than the available cpus of 1

Reason : - By default podman creates the VM with 1 vCPU. minikube (Kubernetes) requires minimum 2vCPU

Steps :

  • Stop the existing VM :
podman machine stop
@fatihyildizhan
fatihyildizhan / Docker 23 + Traefik 2.9.10 and v1.7 + Let's Encrypt + Github Registry V2 ghcr.io + Updated on 12 April 2023
Last active October 22, 2023 11:58
Docker 23 + Traefik 2.9.10 and v1.7 + Let's Encrypt + Github Registry V2 ghcr.io + Updated on 12 April 2023
Docker 23 + Traefik v2.9.10 and v1.7 + Let's Encrypt + Github Registry V2 ghcr.io + Updated on 12 April 2023
Content:
- Ubuntu 22.04
- Docker Engine 23.0.3
- Docker Compose 2.17.2
- Traefik v1.7.18 with dnsChallenge
- Traefik v2.9.9 with httpChallenge
--
- Github Registry V2 ghcr.io
@aliartiza75
aliartiza75 / minio_mc.sh
Last active August 11, 2023 16:53
Command to use mini/mc with minio server
# Step 1 : Start minio server with non-persistent data storage policy
#
# Description: -p 9000:9000: Minio server runs on port 9000 inside the docker container, -e 9000:9000 command is exposing the internal port on
# on external port.
#
# -e "MINIO_ACCESS_KEY=access_key": It sets an envrionment variable inside container named as MINIO_ACCESS_KEY
# with the value provided by user. It will be used when a user wants to access
# minio server
#
# -e "MINIO_SECRET_KEY=access_key_secret": It sets an envrionment variable inside container named as MINIO_SECRET_KEY
@axw
axw / docker-compose.yml
Last active November 2, 2022 20:59
Docker Compose with Elastic Stack and APM Server 6.5.0
version: "2.1"
services:
apm-server:
image: docker.elastic.co/apm/apm-server:${STACK_VERSION:-6.5.0}
ports:
- "127.0.0.1:${APM_SERVER_PORT:-8200}:8200"
- "127.0.0.1:${APM_SERVER_MONITOR_PORT:-6060}:6060"
command: >
apm-server -e
-E apm-server.rum.enabled=true
---
version: '3.6'
services:
# The environment variable "TAG" is used throughout this file to
# specify the version of the images to run. The default is set in the
# '.env' file in this folder. It can be overridden with any normal
# technique for setting environment variables, for example:
#
# TAG=6.0.0-beta1 docker-compose up
#
@abduakhatov
abduakhatov / delete_git_submodule.md
Created October 4, 2018 14:37 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@damonjw
damonjw / LICENSE
Last active March 23, 2024 10:28
Event driven simulator in Python, using async/await
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
@alairock
alairock / exceptions.py
Last active April 17, 2023 21:38
Python Async Retry Decorator.
class TooManyTriesException(BaseException):
pass
@6174
6174 / golang-tls.md
Created December 12, 2016 06:33 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
    
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key
@karpathy
karpathy / min-char-rnn.py
Last active May 1, 2024 11:00
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)