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 July 13, 2024 05:48
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 April 25, 2024 04:21
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 11, 2024 20:51
OpenSource Video Editors
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 24, 2024 12:19
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();