Skip to content

Instantly share code, notes, and snippets.

View asmyshlyaev177's full-sized avatar
💭
Working...

Aleksandr Smyshliaev asmyshlyaev177

💭
Working...
View GitHub Profile
@asmyshlyaev177
asmyshlyaev177 / install-whisper-kdenlive.md
Last active May 10, 2025 16:07
Install whisper for Kdenlive

How to install whisper-openai for Kdenlive

Got a ridiculous error that my Python version is newer than required, so can't install latest version of Whisper.

  1. Preferably use RPM/DEB version of Kdenlive.

  2. Edit requirements file - sudo nvim /usr/share/kdenlive/scripts/whisper/requirements-whisper.txt, can grab filename from error log in Kdenlive when trying to install Whisper.

  3. Overwrite content with this:

numba
@asmyshlyaev177
asmyshlyaev177 / gist:802f4c9478ac62ec3b993876c184766c
Created November 9, 2024 17:16
DeepReadonly recursive typescript type
// Type to make data Readonly recursively
export type DeepReadonly<T> =
T extends Map<infer K, infer V>
? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>>
: T extends Set<infer S>
? ReadonlySet<DeepReadonly<S>>
: T extends object
? { readonly [K in keyof T]: DeepReadonly<T[K]> }
: T;
@asmyshlyaev177
asmyshlyaev177 / linux_tips.sh
Last active May 10, 2025 16:09
Linux stuff
# Command to get program on port, use `ports 3000`, put in `~/.bashrc` or `~/.zshrc`
alias ports='ports(){ lsof -ti:$1;}; ports'
# kill program on port
ports | xargs kill -9
# run program from another linux distribution, e.g. Playwright on Fedora
# create container
distrobox create --pull -i mcr.microsoft.com/playwright:v1.48.1-noble --name ubuntu
@asmyshlyaev177
asmyshlyaev177 / Text Formatting
Created October 19, 2024 17:00 — forked from rhatano/Text Formatting
Text Formatting
<hx></hx>
*//Creates a heading. Usually used to describe a portion of text. x-values range from 1-6, 1 being the largest, with 6 being the smallest
<b></b>
*//Creates bold text
<i></i>
*//Creates italic text
<tt></tt>
@asmyshlyaev177
asmyshlyaev177 / layout.tsx
Last active July 31, 2024 09:28
Access Request object in Nextjs App router
import { headers } from 'next/headers'
export default async function Layout({ children }: { children: React.ReactNode }) {
// access searchParams
const sp = headers().get('searchParams') || ''
...
}
@asmyshlyaev177
asmyshlyaev177 / CustomSelect.cy.jsx
Last active October 17, 2024 20:55
Custom MaterialUI style Select written with TDD.
/* eslint-disable cypress/no-unnecessary-waiting */
import React from 'react';
import { ThemeProvider } from '@material-ui/core/styles';
import CssBaseline from '@material-ui/core/CssBaseline';
import { Popper, Paper } from '@material-ui/core';
import { styled } from '@material-ui/core/styles';
import { theme } from 'components/theme';
import {
CustomSelect,
@asmyshlyaev177
asmyshlyaev177 / tmuxrc
Created January 6, 2019 17:32
tmux config
# set-option -g default-command "reattach-to-user-namespace -l zsh"
# Copy with v y for macos
set-window-option -g mode-keys vi
set -g default-command "reattach-to-user-namespace -l ${SHELL}"
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
bind-key p paste-buffer
# Handling mouse
@asmyshlyaev177
asmyshlyaev177 / vimrc
Last active November 7, 2020 05:29
My vimrc config
" run on first start
" PluginInstall
" install vim-plug
" PlugInstall
" brew install the_silver_searcher
" install https://github.com/Valloric/YouCompleteMe#full-installation-guide
set nocompatible
set mouse=a