Skip to content

Instantly share code, notes, and snippets.

View shakhzodkudratov's full-sized avatar
🙇‍♂️
deep into cli

Shakhzod Kudratov shakhzodkudratov

🙇‍♂️
deep into cli
View GitHub Profile
@thelissimus
thelissimus / 1_sort.ts
Last active April 21, 2024 08:57
Explanation of type classes using TypeScript and Scala. (WIP)
/// Usecases.
type Ordering =
| -1 // Less than
| 0 // Equal
| 1; // Greater than
const LT: Ordering = -1;
const EQ: Ordering = 0;
const GT: Ordering = 1;
@thelissimus
thelissimus / FunctorApplicativeMonad.ts
Created April 5, 2024 21:08
An implementation of an Option with Functor, Applicative and Monad functions in TypeScript.
// NOTE: Provided Haskell signatures were simplified for learning purposes.
// Such as: renaming `<*>` as `apply`. Operators may unnecessarily confuse the
// reader of this file. Check out the documentation if you want to apply this
// knowledge in real Haskell.
type Option<A> =
| { _tag: "None" }
| { _tag: "Some", value: A }
const none = <A>(): Option<A> => ({ _tag: "None" });
@orzklv
orzklv / arch.md
Last active May 30, 2025 11:54
Arch Installation bible written by Sokhibjon. This installation process suits and follows taste of Sokhibjon, so feel free to modify and create your `own` way of installing Arch Linux.

Arch Linux installation if you were Sokhibjon

#arch #linux #archlinux

Please, keep in mind that everything after # is a comment and should not be executed. Also, { something | something } means that you have to make decision and choose one of them, and then write it without curly braces and pipe.

Connect to the network:

@lunks
lunks / gruvbox-dark.conf
Last active June 25, 2025 18:34
gruvbox-dark theme for kitty - the fast, featureful, GPU based terminal emulator
# gruvbox-dark colorscheme for kitty
# snazzy theme used as base
foreground #ebdbb2
background #272727
selection_foreground #655b53
selection_background #ebdbb2
url_color #d65c0d
# black
@branflake2267
branflake2267 / main.dart
Created March 31, 2018 06:36
Flutter - Display the SnackBar using the GlobalKey
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
@jcamp
jcamp / video-editors-opensource.md
Last active July 28, 2025 01:53
OpenSource Video Editors
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active June 6, 2025 20:44
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@danallison
danallison / downloadString.js
Created September 29, 2014 16:44
download string as text file
function downloadString(text, fileType, fileName) {
var blob = new Blob([text], { type: fileType });
var a = document.createElement('a');
a.download = fileName;
a.href = URL.createObjectURL(blob);
a.dataset.downloadurl = [fileType, a.download, a.href].join(':');
a.style.display = "none";
document.body.appendChild(a);
a.click();
@debasishg
debasishg / gist:8172796
Last active June 23, 2025 05:56
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t