Skip to content

Instantly share code, notes, and snippets.

View iturdikulov's full-sized avatar
🎯
Focusing

Inom Turdikulov iturdikulov

🎯
Focusing
View GitHub Profile
@Dylancyclone
Dylancyclone / lrcget.py
Last active July 21, 2024 13:24
MusicBrainz Picard LRCLIB Lyrics Plugin
from functools import partial
from urllib.parse import (
quote,
urlencode,
)
from PyQt5.QtNetwork import QNetworkRequest
from picard import config, log
from picard.metadata import register_track_metadata_processor
@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;
@iturdikulov
iturdikulov / 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

@iturdikulov
iturdikulov / 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 August 24, 2024 02:42
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)
@luochen1990
luochen1990 / venv-py37.nix
Last active August 30, 2024 20:06
Nix Script to simulate FHS environment with python3 & pip & venv
#!/usr/bin/env -S bash -c 'nix-shell --pure $0 -A env'
# Usage:
# 1. run directly to enter bash (inside venv): `./venv-py37.nix`
# 2. build a standalone executable: `nix bundle -f ./venv-py37.nix` #this not works yet since it cause nested `unshare -U` call
# 3. run bash with extra arguments: `nix run -f ./venv-py37.nix '' -- -c 'python --version'`
# More:
# 1. commit id of nixpkgs can be found here: https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=python3
let
@smarteist
smarteist / sql-cheatsheet.md
Last active September 11, 2024 05:31
SQL cheat sheet

SQL languages

DDL is short name of Data Definition Language, which deals with database schemas and descriptions, of how the data should reside in the database.

DCL is short name of Data Control Language which includes commands such as GRANT, and mostly concerned with rights, permissions and other controls of the database system.

DML is short name of Data Manipulation Language which deals with data manipulation, and includes most common SQL statements such INSERT, UPDATE, DELETE etc, and it is used to store, modify, delete and update data in database.

DQL is short name of Data Query Language which used for performing queries on the data within schema objects. The purpose of the DQL Command is to get some schema relation based on the query passed to it. SELECT statement is used to retrieve data from the database.

@imankulov
imankulov / sqlalchemy_with_pydantic.py
Last active September 19, 2024 23:53
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