Skip to content

Instantly share code, notes, and snippets.

View Inom-Turdikulov's full-sized avatar
🎯
Focusing

Inom Turdikulov Inom-Turdikulov

🎯
Focusing
View GitHub Profile
@jnv
jnv / devenv.nix
Created July 25, 2023 10:57
devenv with Python, Poetry and libstdc++.6 somewhat working (still `devenv update` crashes with version `GLIBC_2.36` not found (required by /nix/store/...-gcc-12.3.0-lib/lib/libstdc++.so.6)
{ pkgs, lib, ... }:
{
# https://devenv.sh/packages/
packages = [
pkgs.glib
pkgs.glibc
];
languages.python.enable = true;
@Inom-Turdikulov
Inom-Turdikulov / bitblee-base-commands.md
Last active August 15, 2022 20:45
Bitlbee Base commands

Adding the account

If you understand all of this and still wish to use it, see HowtoPurple and add the account like this in &bitlbee:

account add irc nickname@irc.example.net

Joining channels

Do this in &bitlbee:

chat add irc #channel Then /join #channel

@Inom-Turdikulov
Inom-Turdikulov / doom_emacs_workflow.org
Last active February 26, 2024 04:41
Doom emacs with evil keybdindings workflow

Doom Emacs Workflow

Here I collect, various EMACS/evil/org… tips, shortcuts, keybindings, etc. Also, here some information how I handle daily usage of text editing.

This not absolute beginner cheat sheet, just some short basic commands/tips.

Recommendation - just use it & check it every day (training mode).

@VonHeikemen
VonHeikemen / init.lua
Last active December 22, 2023 07:53
nvim-lspconfig + nvim-cmp setup
--[[
blogpost:
https://vonheikemen.github.io/devlog/tools/setup-nvim-lspconfig-plus-nvim-cmp/
Dependencies:
LSP:
https://github.com/neovim/nvim-lspconfig
https://github.com/williamboman/mason.nvim (optional)
https://github.com/williamboman/mason-lspconfig.nvim (optional)
@imankulov
imankulov / sqlalchemy_with_pydantic.py
Last active May 1, 2024 01:09
Using pydantic models as SQLAlchemy JSON fields (convert beween JSON and pydantic.BaseModel subclasses)
#!/usr/bin/env ipython -i
import datetime
import json
from typing import Optional
import sqlalchemy as sa
from sqlalchemy.orm import declarative_base, sessionmaker
from sqlalchemy.dialects.postgresql import JSONB
from pydantic import BaseModel, Field, parse_obj_as
@fsgreco
fsgreco / tmux-adv-sessionizer.sh
Last active April 1, 2024 17:20
[zsh function] a more advanced tmux sessionizer it can take just a name (-n the_name) optionally
function tm() {
just_name=
while getopts "n:" opt; do
case $opt in
n) just_name="$OPTARG" ;;
esac
done
# if you run `tm .` the directory name will be the name of the session
if [ "$1" = "." ] ; then just_name="$(basename "$PWD" | tr . _)"; fi
@Shou
Shou / README.md
Last active October 2, 2023 00:09
PureRef nixpkg

PureRef nixpkg

This is a hacky appimage wrapper nixpkg for PureRef to integrate it into NixOS better. As you may know, it's donationware, so the author encourages a donation and this means there's no way around manually downloading the program. So as a prerequisite, you need to download PureRef separately and slap it in the same folder as the Nix file, or alternatively, change the path to an absolute one, e.g.

src = /home/you/Downloads/PureRef-1.11.1_x64.Appimage;

Ideally this would use the actual Nixpkg appimage build tooling... but that's effort, and I just want to get shit done right now and this works fine.

Usage

@ob1-sc
ob1-sc / win11-setup.ps1
Last active November 20, 2023 04:13
Windows 11 Setup Script
#Install WinGet
#Based on this gist: https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901
$hasPackageManager = Get-AppPackage -name 'Microsoft.DesktopAppInstaller'
if (!$hasPackageManager -or [version]$hasPackageManager.Version -lt [version]"1.10.0.0") {
"Installing winget Dependencies"
Add-AppxPackage -Path 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'
$releases_url = 'https://api.github.com/repos/microsoft/winget-cli/releases/latest'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
@jtatum
jtatum / README.md
Last active June 11, 2022 12:10
Running Sendy on AWS ECS + Fargate

Sendy on ECS + Fargate

It's possible to run Sendy on ECS + Fargate. My infrastructure is as follows:

  • RDS MySQL
  • EFS
  • ALB
  • ACM certificate
  • ECS Service
  • ALB target group

"better" gx for vim

Vim has built-in gx mapping to open an URL under the cursor defined in the bundled netrw plugin. It is limited to barebone urls and quite often that is not enough.

I have come up with a better gx mapping (for me of course) that is able to open:

  • markdown links [Hacker news](https://news.ycombinator.com 'link to Hacker news website');

  • asciidoc links https://news.ycombinator.com[Hacker news];