Skip to content

Instantly share code, notes, and snippets.

View xaker00's full-sized avatar

Ilya Spivakov xaker00

  • Charlotte, NC (USA)
View GitHub Profile
@xaker00
xaker00 / Dockerfile
Last active June 26, 2024 01:36
Dockerfile to build ipxe
FROM debian:bookworm as builder
# parts borrowed from https://gist.github.com/rikka0w0/50895b82cbec8a3a1e8c7707479824c1
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && \
apt install --yes \
git \
gcc \
make \
@xaker00
xaker00 / couchdb.md
Last active October 13, 2023 18:53 — forked from eiri/primer.md
Edit CouchDB design document with curl

Edit CouchDB design document with curl

create new database

$ curl -X PUT http://localhost:5984/koi
{"ok":true}

create a single document

$ curl -X POST http://localhost:5984/koi -d '{"name":"alice","age":25}' -H'Content-Type:application/json'
@xaker00
xaker00 / README.txt
Created January 7, 2023 07:48 — forked from cernoel/README.txt
btrfs + beesd dedup setup on debian 10
# install btrfs + bees (dedup daemon)
# ---------------------------------
# add new "big" disk to vm (edit vm, add new disk)
# be root
su -
# check for new disk in guest
@xaker00
xaker00 / _clock.md
Last active August 4, 2022 16:19
HTML clock

Live clock

Configurable live clock with timezone offsets.

Usage

Use any HTML tag with class clock-widget.

Basic clock without special formatting or UTC offset

<span class="clock-widget"></span>
@xaker00
xaker00 / logging_config.py
Created April 6, 2022 18:39
Python deduplicating log filter
import logging
import atexit
import pprint
class DeduplicationFilter(logging.Filter):
def __init__(self):
self.last_record = None
self.count = 1
atexit.register(self._flush)
@xaker00
xaker00 / regex.md
Last active October 19, 2021 23:41
Matching hex colors using regex

Identifying hex color using regex

HTML/CSS color are defined using six or three character hex values prefixed with an optional # symbol

/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i

Summary