Skip to content

Instantly share code, notes, and snippets.

@mklishevych
mklishevych / dc-down-all.sh
Created March 16, 2023 08:18 — forked from terashim/dc-down-all.sh
List or down all Docker Compose projects running on your machine
#!/usr/bin/env bash
#
# Down all running Docker Compose projects
#
docker ps --filter "label=com.docker.compose.project" -q |\
xargs docker inspect |\
jq -r 'map( .Config.Labels ) |
map({"
project": ."com.docker.compose.project",
@mklishevych
mklishevych / Transactions.dart
Created December 6, 2018 08:41 — forked from ulyanovn/Transactions.dart
Flutter Finance Workshop
import 'package:meta/meta.dart';
class Transactions {
final String comment;
final int type;
final double sum;
final int time;
Transactions({
@mklishevych
mklishevych / postgres_queries_and_commands.sql
Created September 13, 2016 15:45 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'

How to become a decent photographer in five years

You're not gonna become a master in your spare time, but you can get decently good at photography in five years of dedicated but non-full-time practice. It's taken me about twice that to get decent, but I fucked around a lot along the way.

You don't need a ton of fancy equipment, but photography does require some gear. I'll limit the gear-buying here to once a year (not counting books).

  • create a new redis .conf file
$ cp /etc/redis.conf /etc/redis-xxx.conf
  • edit /etc/redis-xxx.conf, illustrated as below
...

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results