Skip to content

Instantly share code, notes, and snippets.

View darvesh's full-sized avatar
🏠

Darvesh darvesh

🏠
View GitHub Profile
<html lang="en"><head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Temporary Pastebin</title>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ipfs/0.54.4/index.min.js" integrity="sha512-6GHE5kFKM1y+tmjSWrTCF13qsIqV9hDYYwrZ9iu/7wnoY4qvq/u7qSVKN4iDk0xeI7pLv6h3nBRp64aIYya8KA==" crossorigin="anonymous" referrerpolicy="no-referrer">
</script>
<script>
@ZeusOfTheCrows
ZeusOfTheCrows / Telegram Theming Reference.md
Last active June 14, 2024 15:53
Comprehensive reference description of telegram theming elements
@ClickerMonkey
ClickerMonkey / types.ts
Last active August 8, 2024 00:25
Typescript Helper Types
// when T is any|unknown, Y is returned, otherwise N
type IsAnyUnknown<T, Y, N> = unknown extends T ? Y : N;
// when T is never, Y is returned, otherwise N
type IsNever<T, Y = true, N = false> = [T] extends [never] ? Y : N;
// when T is a tuple, Y is returned, otherwise N
// valid tuples = [string], [string, boolean],
// invalid tuples = [], string[], (string | number)[]
//
// Prelude
// A zero dependency, one file drop in for faster Typescript development with fewer bugs
// through type safe, functional programming. Comments are inline with links to blog posts motiviating the use.
// alias for a function with airity 1
export type Fn<A, B> = (a: A) => B;
// alias for a function with airity 2
@getify
getify / monads-and-friends.md
Created July 16, 2020 19:38
Monads and Friends...

Monads and Friends...

Over the last 24-48 hours, I've fielded quite a flurry of tweets related to a couple of threads I posted recently. Upon reflection on the feedback, especially the negative stuff, I decided to write this blog post to clarify a few things about my background on the topic, what I was trying to say, what I've done so far, and what I'm hoping to do (and learn!) in the future.

It's a bit of a lengthy read, but if you find you've got the time, I hope you'll read it.

To be clear, the feedback has been on a broad spectrum. A lot of it was actually quite positive, people thanking me and appreciating my continued efforts to try to make dev topics approachable. As a matter of fact, over the years, I've received boat loads of such positive feedback, and I'm tremendously grateful that I've had a helpful impact on so many lives.

But some of it veered decidedly the other direction. I'm deliberately not linking to it, because I don't want to either amplify or gang up on those folks. I'm offended an

@MKRhere
MKRhere / README.md
Last active November 22, 2022 20:42
nginx (static or reverse proxy) & acme.sh (DNS) configuration

1) Create the following directory structure

/etc
β”œβ”€β”€ nginx
β”‚   β”œβ”€β”€ sites-enabled
β”‚   β”‚   └── domain.tld.port.conf # template attached
β”‚   └── ssl
β”‚       β”œβ”€β”€ .conf # file attached as `ssl.conf`
β”‚       β”œβ”€β”€ dhparam.pem # generated
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active April 30, 2025 07:51
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@MKRhere
MKRhere / minio.sh
Last active August 19, 2021 12:30
Minio installer
#!/usr/bin/env bash
# Setup user
sudo useradd -m minio
cd /home/minio
# Download minio and make it executable
wget https://dl.minio.io/server/minio/release/linux-amd64/minio
sudo chown minio:minio ./minio
chmod +x ./minio
@MKRhere
MKRhere / chained.pipe.js
Last active January 9, 2019 19:21
Chaining pipe
const _makeProxy = f => new Proxy(f, {
get (fn, prop) {
return U[prop] && U[prop].bind({ hold: fn });
}
});
const U = {
add: function (x) {
return _makeProxy(
y => (
@bradtraversy
bradtraversy / ssh.md
Last active April 30, 2025 03:35
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh [email protected]

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test