Skip to content

Instantly share code, notes, and snippets.

@kytta
kytta / docker_deep_clean.sh
Created November 30, 2019 12:44
Docker Deep Clean — a script to remove all unused Docker containers, images and volumes
#!/bin/bash
echo "Removing exited containers..."
echo "============================="
docker ps --filter status=dead --filter status=exited -aq | xargs docker rm -v
echo ""
echo "Removing unused images..."
echo "========================="
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs docker rmi

Keybase proof

I hereby claim:

  • I am nickkaramoff on github.
  • I am nickkaramoff (https://keybase.io/nickkaramoff) on keybase.
  • I have a public key ASAY1U5gd0Q8Be8_L_nwXwWqpNRePhjp5n44zMiBK8T40Ao

To claim this, I am signing this object:

@kytta
kytta / srcswitch.json
Created June 27, 2020 12:14
Karabiner rule that switches to MigrantTastatur on Caps and to Russian on Shift-Caps
{
"title": "Sitnik-style Source Switching",
"rules": [
{
"description": "Caps Lock to en, Shift+Caps Lock to ru",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
@kytta
kytta / .gitlab-ci.yml
Created August 4, 2018 17:08
GitLab CI config for an Android project
image: jangrewe/gitlab-ci-android
variables:
ANDROID_COMPILE_SDK: "27"
APP_NAME: "NameOfYourApp"
cache:
key: ${CI_PROJECT_ID}
paths:
- .m2/
@kytta
kytta / index.html
Created March 20, 2021 08:35
Bootstrap Demo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Bootstrap demo for the best group ever</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
crossorigin="anonymous">
@kytta
kytta / .p10k.zsh
Last active April 12, 2021 09:17
My ZSH config (includes powerlevel10k)
# Temporarily change options.
'builtin' 'local' '-a' 'p10k_config_opts'
[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases')
[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob')
[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')
'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
() {
emulate -L zsh
setopt no_unset extended_glob
@kytta
kytta / stats.md
Last active July 24, 2021 04:53
Overview

@kytta
kytta / transition.txt
Created September 8, 2021 11:30
OpenPGP key transition statement
Date: 08 September 2021
Over the last decade I have been trying to grasp over what OpenPGP and GnuPG
actually are. I was not sure about how’s and why’s of the technology, which is
why I have accumulated a lot of various OpenPGP keys. Some of them are too
small, some are long expired, some have weak passwords, and some are completely
inaccessible.
In order not to confuse other people and to finally establish my online
identity, I have set up a new OpenPGP key. From now on, this will be my primary
@kytta
kytta / metadater.md
Last active October 25, 2021 17:22
Google Photos metadata parser and converter
const date = new Date("1970-01-30");
function logDate(locale) {
console.log(
locale.padStart(8),
" ",
new Intl.DateTimeFormat(locale, { dateStyle: "short" })
.format(date)
.padEnd(16),
new Intl.DateTimeFormat(locale, { dateStyle: "medium" })