Skip to content

Instantly share code, notes, and snippets.

View akrisanov's full-sized avatar

Andrey Krisanov akrisanov

View GitHub Profile
@akrisanov
akrisanov / 1-setup.md
Created June 23, 2025 13:53 — forked from troyfontaine/1-setup.md
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@akrisanov
akrisanov / linux-setup.sh
Created February 9, 2025 18:36 — forked from dhh/linux-setup.sh
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@akrisanov
akrisanov / downloader.cs
Created December 26, 2024 14:34
The application downloads a list of URLs
using System.Net.Http;
namespace UrlDownloader;
public class Downloader
{
private readonly string _downloadPath = "downloads";
private readonly HttpClient _httpClient;
private readonly SemaphoreSlim _semaphore;
@akrisanov
akrisanov / LLM.md
Created April 18, 2023 22:22 — forked from rain-1/LLM.md
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.

@akrisanov
akrisanov / 02_let.ml
Last active February 19, 2023 20:07
OCaml From Very Beginning
let isvowel c =
c = 'a' || c = 'e' || c = 'i' || c = 'o' || c = 'u';;
let isconsonant c = not (isvowel c);;
let rec factorial n =
if n <= 0 then 1
else n * factorial (n - 1);;
#!/bin/bash
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
# Create subfolder to store renamed files
createDestination() {
destination="$(dirname "$file")/sorted"
mkdir -p "$destination"
}
# See explanation of linters at https://golangci-lint.run/usage/linters/
linters:
disable-all: true
enable:
- bodyclose
# Disabled due to flakes: https://github.com/sourcegraph/sourcegraph/issues/33183
# - depguard
- forbidigo
- gocritic
- goimports
using System;
class Program {
static void Main(string[] args) {
var name = "Microsoft";
Console.WriteLine($"Hello, {name}!");
}
}
@akrisanov
akrisanov / Makefile
Last active May 9, 2025 14:19
Makefile for FastAPI project
.PHONY: psql up down venv check-deps update-deps install-deps isort black mypy flake8 bandit lint test migrate serve
ifneq (,$(wildcard ./.env))
include .env
export
endif
VENV=.venv
PYTHON=$(VENV)/bin/python3