Skip to content

Instantly share code, notes, and snippets.

View hkdobrev's full-sized avatar

Harry Dobrev hkdobrev

View GitHub Profile
@elithrar
elithrar / Dockerfile
Last active August 20, 2026 14:34
Minimal ephemeral GitHub Actions runner on Cloudflare Sandboxes
# syntax=docker/dockerfile:1
ARG SANDBOX_VERSION=0.12.5
ARG SANDBOX_DIGEST=sha256:315b14485d6982774521f3e2f605fdf39ba6de6942d65a022048a54967ca0062
FROM docker.io/cloudflare/sandbox:${SANDBOX_VERSION}@${SANDBOX_DIGEST}
ARG RUNNER_VERSION=2.336.0
ARG RUNNER_SHA256=04cf0be1aff4c3ec3554466c39124ca250e3effd8873bb7e8d68535aa9505d5d
ARG DOCKER_VERSION=29.7.2
ARG DOCKER_SHA256=803d433f226db4776e1768fd319fc6c6e4935a456acf84fcc0080818b854bc8f
@rameerez
rameerez / docker-host-production-setup-ubuntu-server.sh
Last active February 15, 2026 19:36
This script sets up a secure, production-ready Docker host on Ubuntu Server 22.04 LTS
#!/bin/bash
# Production Docker Host Setup Script
# This script sets up a secure, production-ready Docker host on Ubuntu Server 22.04 LTS
# It includes security hardening, performance optimizations, and best practices
# CAUTION: This script makes significant system changes. Use at your own risk.
set -euo pipefail
# --- AESTHETICS ---
@AddisonG
AddisonG / mailmap_maker.py
Created October 25, 2023 05:17
Automatically build a .mailmap file
#!/usr/bin/env python3
"""
Run this like:
cd /my/git/dir/
git shortlog -s -n -e | python3 ~/mailmap.py > .mailmap
"""
import sys
@rain-1
rain-1 / LLM.md
Last active September 20, 2026 22:21
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

How to make a small tweak to free software

The target audience for this is people who are beginners at software engineering and using linux. A lot of the information here may be obvious or already known to you. The language involved is C but you do not need to know any C to read this tutorial. I used mg to write this blog post. I used vs code to edit the source code.

This post is also available on gopher://tilde.team:70/0/~river/tweak-free-software

If you use a piece of free software and it's 99% perfect but there's just this one thing it does that annoys the hell out of you.. you can in theory just fix it! Here's a look at what doing that is like. Hopefully it inspires you, or you pick up a could tricks on the way!

Step 0: Have a problem

@tzmartin
tzmartin / show-hn.md
Created August 8, 2020 18:01
How to Submit a Show HN

How to Submit a "Show HN"

If you're sharing your own work and there's a way to try it out, put "Show HN" in the title. Make sure you've read the Show HN guidelines: https://news.ycombinator.com/showhn.html.

Posts without URLs get penalized, so when you submit, put your site in the URL field and leave the text field blank.

Add a comment to the thread giving the backstory of how you came to work on this, and explaining what's different about it. That tends to seed discussion in a good direction.

Include a clear statement of what your project is or does. If you don't, the discussion will consist of "I can't tell what this is". >

@Oldes
Oldes / graphql-requests.reb
Created May 25, 2020 10:56
Some useful GraphQL queries
Rebol []
last-20-closed-issues: {
query($owner:String!,$repo:String!) {
repository(owner:$owner, name:$repo) {
issues(last:20, states:CLOSED) {
edges {
node {
title
url
# PHP Architecture Tester pre-commit hook for git
#
# @author Carlos Alandete <carlos.alandete@gmail.com>
#
STAGED_FILES_PHP=$(git diff --cached --name-only --diff-filter=ACM | grep '^src.*\.php\?$')
if [[ "$STAGED_FILES_PHP" == "" ]]; then
printf "\033[1;32mNo files that could affect PHP Architecture Tester\033[0m\n\n"
exit 0
fi
@royshouvik
royshouvik / console.ts
Last active October 4, 2022 00:12
Nestjs REPL
import 'dotenv/config';
import { NestFactory } from '@nestjs/core';
import * as repl from 'repl';
import * as Logger from 'purdy';
const LOGGER_OPTIONS = {
indent: 2,
depth: 1,
};
// inspired by https://github.com/tj/git-extras/blob/master/bin/git-line-summary
const util = require("util");
const exec = util.promisify(require("child_process").exec);
const execSync = require("child_process").execSync;
const DIR = "/Users/poshannessy/FB/code/react-clean";
const REF = "origin/master";
const AUTHOR = "Paul O’Shannessy";
const PERIOD_DAYS = 1;