Skip to content

Instantly share code, notes, and snippets.

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

rkkm realkarmakun

🏠
Working from home
  • Russia
View GitHub Profile
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-deployment
spec:
replicas: 2
selector:
matchLabels:
app: my-deployment
template:
@haskaalo
haskaalo / tarcheatsheet.md
Last active June 17, 2024 06:31
Tar usage / Tar Cheat Sheet

Tar Usage / Cheat Sheet

Compress a file or directory

e.g: tar -czvf name-of-archive.tar.gz /path/to/directory-or-file

  • -c: Create an archive.
  • -z: Compress the archive with gzip.
  • -v: makes tar talk a lot. Verbose output shows you all the files being archived and much.
  • -f: Allows you to specify the filename of the archive.
@jonesinator
jonesinator / combination.py
Created March 15, 2017 02:40
Compute the nth combination in lexicographic order more efficiently.
#! /usr/bin/python
#
# This snippet provides a simple function "combination" that can compute an
# arbitrary k-combination of n elements given an index m into the
# lexicographically ordered set of all k-combinations of n elements.
from math import factorial
@nrollr
nrollr / nginx.conf
Last active June 9, 2024 23:39
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
@inequation
inequation / hdd2ssd-dualboot.md
Last active December 9, 2022 00:58
Guide to migrating a dual-boot Linux/Windows system to an SSD

Having painstakingly performed the operation of migrating dual-boot systems to SSDs (without a fresh install of any of the systems) twice in the recent days, I've decided to write the steps down in case I ever need to repeat it. It may also benefit someone else on the internet. This is the most efficient and least error-prone workflow to the best of my knowledge, and discovering it was not as easy as it may seem.

Please excuse the somewhat short-hand form of this guide; I take the liberty to assume the reader is a power-user and is at least familiar with Linux.

The scenario

Here are the specific conditions I worked under:

  • Dual-boot, Linux/Windows system.
  • MBR partition tables.