Skip to content

Instantly share code, notes, and snippets.

View LuckyGeck's full-sized avatar
🌳

Pavel Sychev LuckyGeck

🌳
View GitHub Profile
@bobuk
bobuk / img.py
Last active March 31, 2024 22:58
Сегодня я вам покажу, как написать маленький скриптик, который умеет искать похожие фотографии. Зачем? Ну, если честно - совсем без причины.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Video of this screencast: https://vimeo.com/57296525
#
#
from __future__ import print_function, division, absolute_import
from PIL import Image as pImage
import numpy
@mosquito
mosquito / README.md
Last active July 24, 2024 14:40
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@ilya-biryukov
ilya-biryukov / symbols.sh
Created April 21, 2018 20:14
Build and use global index in clangd
# First, build the index builder.
ninja global-symbol-builder
# $LLVM_PATH is source directory of LLVM.
# compile_commands.json (or a symlink to it) should be there.
# Running this takes considerable time (> 30 mins).
./bin/global-symbol-builder -executor=all-TUs $LLVM_PATH > $HOME/llvm_clangd.symbols
# Run clangd with the following arg to make it pick up the built index:
# -yaml-symbol-file=$HOME/llvm_clangd.symbols
// homerunner is Brad's shitty Docker wrapper after he got tired of running
// HA nine-VM Kubernetes clusters. Earlier versions of this tried to use podman
// and fancy cloud-init and CNI stuff but then I decided to go to the other
// extreme and write something super specific to what I need and super dumb:
// run my containers from gcr.io, and use my home Ceph cluster for mounts/state.
//
// This primarily runs Home Assistant, HomeSeer, an MQTT server, and some cameras.
// And some omitted misc stuff.
package main