Skip to content

Instantly share code, notes, and snippets.

View NikolaRHristov's full-sized avatar
🦧
Default

Nikola Hristov NikolaRHristov

🦧
Default
View GitHub Profile
@NikolaRHristov
NikolaRHristov / vscode.sh
Created October 28, 2023 22:19
Fork bomb Microsoft
#!/bin/bash
# 1) Page by page on https://github.com/orgs/microsoft/repositories?q=vscode&type=all&language=&sort= do:
# document.querySelectorAll('.Link.d-inline-block[itemprop="name codeRepository"]').forEach(el => console.log(el.getAttribute('href')))
# 2) Found repositories
REPOS_ORG=(
"microsoft/applicationinsights-vscode"
@NikolaRHristov
NikolaRHristov / return-void-question-mark.ts
Last active September 7, 2023 22:06
Checks if function returns void. Basically Wrap()
// rome-ignore lint/suspicious/noExplicitAny:
export default <T extends (...args: any[]) => any>(
Fn: T,
With?: Parameters<T>[0]
): ReturnType<T> | boolean => {
try {
const Return = typeof With !== "undefined" ? Fn(With) : Fn();
if (typeof Return !== "undefined") {
return Return;
import { z } from "zod";
export const Fn = z.object({
API: z
.string()
.url("Must be a URL")
.endsWith("/", { message: "URL must end with /" }),
Socket: z
.string()
.url("Must be a URL")
/**
* The function converts a nested Map object into a nested plain JavaScript object.
* @param {unknown} Instance - The `Instance` parameter is of type `unknown`, which means it can be any
* type. It is used to represent an instance of a class or an object.
* @returns an object representation of the input `Instance`. If `Instance` is an instance of `Map`,
* the function recursively converts it into an object by iterating over its entries. If an entry value
* is also an instance of `Map`, it is converted recursively as well. The resulting object is then
* returned. If `Instance` is not an instance of `Map`, it is returned as is
*/
export const Put = (Instance: unknown) => {
@NikolaRHristov
NikolaRHristov / webcrypto-examples.md
Created June 3, 2023 08:07 — forked from bobbyecho/webcrypto-examples.md
Web Cryptography API Examples
9:37cccjjjeee
: hi
:)
im starting a refactor of the trpc docs tomorrow so hoping to pick up a thing or two tonight
9:37
ElianCodes
: What are your goals for the Solid docs on the "short term"?
9:37
Jutanium
: @ElianCodes !docsplan
<!DOCTYPE html>
<html>
<head>
<style>
canvas {
border: 1px solid black;
}
</style>
</head>
<body>

Keybase proof

I hereby claim:

  • I am nikolaxhristov on github.
  • I am nikolaxhristov (https://keybase.io/nikolaxhristov) on keybase.
  • I have a public key ASCONKD-2813_oOaZbblI32c1sW-tuLHP5X5ETRuIHFzgwo

To claim this, I am signing this object:

fs.suid_dumpable=0
kernel.randomize_va_space=2
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.default.rp_filter = 1