Skip to content

Instantly share code, notes, and snippets.

View viatcheslavmogilevsky's full-sized avatar

Vyatcheslav Mogilevsky viatcheslavmogilevsky

View GitHub Profile
@rob3c
rob3c / cdk-docker-buildkit-helpers.ts
Last active December 1, 2022 08:52
AWS CDK helpers for asset bundling using Docker BuildKit builds
/**
* This is a placeholder until the CDK fully supports Docker BuildKit builds.
*
* Gist with the latest version: https://gist.github.com/rob3c/8bf845918bc5270c5e22da0674081f90
*
* Open CDK github issue about missing BuildKit support: https://github.com/aws/aws-cdk/issues/14910
*
* Docker BuildKit guide: https://docs.docker.com/develop/develop-images/build_enhancements/
*
* This is a minimal extension based on the CDK source here that's not otherwise extendable:
@vegard
vegard / kernel-dev.md
Last active April 1, 2025 19:37
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.

@mkfares
mkfares / zsh-keyboard-shortucts.md
Last active April 27, 2025 07:20
Common zsh Keyboard Shortcuts on macOS Catalina

Common zsh Keyboard Shortcuts on macOS

Navigation

CTRL + A : Move the cursor to the beginning of the line
CTRL + E : Move the cursor to the end of the line
OPTION + Left Arrow : Move the cursor one word backward
OPTION + Right arrow : Move the cursor one word forward
Left Arrow : Move the cursor one character backward
Right Arrow : Move the cursor one character forward

@pgilad
pgilad / docker-volume-prune.sh
Created May 4, 2020 19:03
Docker volume prune with until workaround (filter for --until isn't supported)
#!/usr/bin/env bash
set -euo pipefail
volumes=$(docker volume ls --filter dangling=true --quiet)
if [[ -z "$volumes" ]]; then
echo "No dangling volumes found"
exit 0
fi
@krisleech
krisleech / renew-gpgkey.md
Last active April 27, 2025 07:09
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@SuryaElite
SuryaElite / sublime-merge-command-line.md
Created September 23, 2018 09:49
Launch Sublime Merge from the command line on OSX

Launch Sublime Merge from the command line on OSX

Sublime Merge includes a command line tool, smerge, to work with git, subversion, mercurial projects on the command line. This can be used to open projects in Sublime Merge using the command line.

Requirements

  • Sublime Merge installed in your system within Applications folder

Setup

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 5, 2025 17:53
set -e, -u, -o, -x pipefail explanation
@troyfontaine
troyfontaine / 1-setup.md
Last active May 6, 2025 12:21
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@deargle
deargle / client.conf
Last active April 3, 2025 18:13
OpenVPN server.conf and client.conf
##############################################
# Sample client-side OpenVPN 2.0 config file #
# for connecting to multi-client server. #
# #
# This configuration can be used by multiple #
# clients, however each client should have #
# its own cert and key files. #
# #
# On Windows, you might want to rename this #
# file so it has a .ovpn extension #
@kitwalker12
kitwalker12 / migrate-redis.py
Created March 4, 2017 00:11 — forked from thomasst/migrate-redis.py
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.