Skip to content

Instantly share code, notes, and snippets.

View vgribok's full-sized avatar

Vlad Hrybok vgribok

View GitHub Profile
@vgribok
vgribok / Yuriy Hrybok Obituary.md
Last active November 3, 2024 23:58
The obituary of Yuriy Hrybok, by Vlad Hrybok

Obituary for Yuriy Hrybok, by Vlad Hrybok.

What a human he was.

He was singularly the warmest person I ever met. I am most thankful to him for setting the example, for defining the norm by just being himself: the baseline where you forgive others more than yourself and where patience with others is an effort worth taking on. He was never to intrude, with nearly zero selfishness, with an incredible sense of boundaries, with not a shred of cynicism, with not a hint of manipulativeness. And with a smile: either smiling at a joke even if it was about him, or because he saw someone he cherished. A few days before he’s passed, I brought a phone with my wife greeting him over the remote chat. His smile was so sincere and so clear that he was delighted to see her. Barely conscious, he was still most happy when he saw people he loved, that love and appreciation emanating through the thick of the illness. He always treated new people in his life with respect and the assumption of good faith.

He’d invest so much tim

@vgribok
vgribok / Import star rating from clip name.py
Last active October 5, 2024 21:48
Imports star rating from the video file name into Davinci Resolve clip Keywords metadata
# Rate your clips in DavinciResolve Media Pool with star ratings.
# For example, if a clip (file) name is 'IMG_9356.MOV', your could
# rename the clip as 'IMG_9356 - 5st - Adeli penguin closeup.MOV'.
# After you have rated clips, run this script, and it do two things:
# 1. It will add the "5st" rating as a clip Keyword, enabling
# finding your clips by ratings via Media Pool Smart Bins, and
# 2. It will rename the clip giving it the name of the clip, while
# relinking the clip to the new file name.
#
# IMPORTANT: This clip will process all clips in a selected
@vgribok
vgribok / ollama-install-and-run.md
Last active April 29, 2025 23:18
How to run local LLM on your computer with Ollama
@vgribok
vgribok / gist:1b43d166747e138f4f99ab78387fd129
Last active March 19, 2024 02:04 — forked from nekiee13/gist:c8ec43bce5fd75d20e38b31a613fd83d
Install Ollama under Win11 & WSL - CUDA Installation guide

CMD prompt - verify WSL2 is installed

wsl --list --verbose
or
wsl -l -v

git clone CUDA samples - I used location at disk d:\LLM\Ollama , so I can find samples with ease

d: && cd d:\LLM\Ollama git clone --recursive -j6 https://github.com/NVIDIA/cuda-samples.git

@vgribok
vgribok / rds-parameter-group-exporter-importer.ps1
Last active June 21, 2023 18:40
Allows copying RDS parameter groups between AWS Regions and Accounts. Enables version-controlling values of RDS param groups via JSON files. Makes possible RDS cluster provisioning automation for custom parameter groups.
<#
Allows exporting RDS Parameter Group parameters as a file and importing it in another AWS Account or a region.
Inspired by https://gist.github.com/phill-tornroth/f0ef50f9402c7c94cbafd8c94bbec9c9.
PowerShell is a *cross-platform* shell compatible with Linux, MacOS and Windows.
PowerShell can be installed in seconds: https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell
Usage:
To *export* a cluster parameter group named "custom-aurora-postgresql13-babelfish-compat-1", run:
# These commands are DANGEROUS! They may DELETE ALL YOUR DATA in AWS S3!
# Use at your own risk! NO WARRANTY OR LIABILITY IS ASSUMED OR WILL BE ACCEPTED!
# The main purpose is to delete multiple (non-empty) S3 buckets using
# bucket name prefix, converted by the script to a wildcard.
# Uses PowerShell Tools for AWS.
# You may need to swtich to bucket's AWS Region if you are getting the following error:
# "The bucket you are attempting to access must be addressed using the specified endpoint.
# Please send all future requests to this endpoint."
@vgribok
vgribok / CancellationToken.dart
Last active September 6, 2022 13:59
Dart/Flutter CancellationToken class friendly to the CancelableOperation and Future
part of flutter_nav2_oop;
/// Enables cancelling multiple cancellable operations at once,
/// and provides less error-prone pattern for using [CancelableOperation].
///
/// This class augments two flaws of the [CancelableOperation]:
/// 1. Ability to cancel multiple operations at once.
/// 2. Using correct method - `valueOrCancellation()` - of the [CancelableOperation]
/// to access async result, ensuring cancellation works properly.
class CancellationToken {
@vgribok
vgribok / AmplifyCompWithAuth.tsx
Last active June 6, 2021 01:37
Showing how to customize AWS Amplify UI components for React Native using withAuthenticator() function, by 1) changing username to email address, 2) supplying a theme overriding Amplify orange, and 3) updating sign up form with removing phone number field and adding person's name field
/*
AWS Amplify withAuthenticator() function for React Natvive has two arguments sets, and combining signUpConfig, a theme,
and replacing username with email was hard to figure out, and no internet samples shown how to do that.
Here's the example of how to all of the above.
*/
// @ts-ignore
import { withAuthenticator, AmplifyTheme } from 'aws-amplify-react-native'
import Local from "~/constants/Strings";
import cloneDeep from 'lodash/cloneDeep';
import { ColorValue, Platform } from "react-native";
@vgribok
vgribok / App.js
Last active February 13, 2021 17:08
An expanded sample for the "Building Offline-first Cross-platform Apps with Expo and Amplify DataStore" youtube video
import * as React from 'react'
import Constants from 'expo-constants'
import Amplify from '@aws-amplify/core'
import { DataStore } from '@aws-amplify/datastore'
import { TapGestureHandler, State } from 'react-native-gesture-handler'
import {
Text,
View,
TextInput,
@vgribok
vgribok / how-can-they-be-so-brainwashed.md
Last active July 21, 2023 16:58
An attempt at understanding of how humans think: the natural limit of power of reasoning

How can the other side be so brainwashed?

How can people on the other side of the political or phylosophical devide be so incredibly blind? How can they be so impervious to the obvious truth and evidence?

Abstract

This paper (a work in progress) seeks to put forward a hypothesys (framework) - really a minimal set of assumptions - in which irrational human behavior makes sense. The paper analyzes a few ways, both destructive and productive, in which humanity responds to challenges within this framework. Finally it provides recommendations for ways of improving our chances for continual peaceful and prosperous existance, hopefully replacing total falls of civilizations with just temporary dips.

The unfinished nature of this arcticle means that some parts of it a well tought out and written somewhat coherently, others represent a more raw idea or observation, needing future refinement.

Key observations