Skip to content

Instantly share code, notes, and snippets.

View HristoKolev's full-sized avatar
🎯
Focusing

Hristo Kolev HristoKolev

🎯
Focusing
View GitHub Profile
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
// Default to the user's OS color-scheme preference; the Mockup-controls
// Theme toggle still overrides it. Runs in <head> to avoid a flash.
document.documentElement.className = window.matchMedia(
'(prefers-color-scheme: dark)'
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
// Default to the user's OS color-scheme preference; the Mockup-controls
// Theme toggle still overrides it. Runs in <head> to avoid a flash.
document.documentElement.className = window.matchMedia(
'(prefers-color-scheme: dark)'
<!doctype html>
<html lang="en" class="dark">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>io.Manager — &lt;Feature&gt; (mockup)</title>
<style>
/* SHELL:start head-css */
* {
box-sizing: border-box;
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>htmlpreview test</title>
<style>
body {
font-family: system-ui, sans-serif;
max-width: 40rem;
margin: 3rem auto;

Configuring git to use SSH (a little misleading calling it gpg.format) for signing commits:

git config --global gpg.format ssh

Configuring git to sign commits with your SSH key:

git config --global user.signingkey $env:USERPROFILE\.ssh\id_ed25519.pub

git config --global gpg.ssh.allowedSignersFile $env:USERPROFILE\.ssh\allowed_signers

By default the ssh-agent service is disabled. Configure it to start automatically.

Get-Service ssh-agent | Set-Service -StartupType Automatic

To start the ssh-agent service:

Start-Service ssh-agent

To stop the ssh-agent service:

/api/bla:
get:
operationId: some_operation
parameters:
- name: param_name
required: true
in: query
schema:
$ref: '#/components/schemas/SomeModel'
content:
@HristoKolev
HristoKolev / Container ENV variable passthrough to JS Frontend
Created November 14, 2024 12:31
Container ENV variable passthrough to JS Frontend
echo "window.process.env = `jq env -n | jq 'with_entries(select(.key | startswith("REACT_APP_")))'`;" > env.js
ALTER TABLE "users" ALTER COLUMN "users_id" DROP IDENTITY IF EXISTS;
CREATE SEQUENCE IF NOT EXISTS "users_users_id_seq" AS integer;
ALTER TABLE "users" ALTER COLUMN "users_id" SET DEFAULT nextval('"users_users_id_seq"'::regclass);
ALTER SEQUENCE "users_users_id_seq" OWNED BY "users"."users_id";
SELECT setval('"users_users_id_seq"', (SELECT MAX("users_id") FROM "users"));
ALTER TABLE "sessions" ALTER COLUMN "sessions_id" DROP IDENTITY IF EXISTS;
CREATE SEQUENCE IF NOT EXISTS "sessions_sessions_id_seq" AS integer;
ALTER TABLE "sessions" ALTER COLUMN "sessions_id" SET DEFAULT nextval('"sessions_sessions_id_seq"'::regclass);
ALTER SEQUENCE "sessions_sessions_id_seq" OWNED BY "sessions"."sessions_id";