Skip to content

Instantly share code, notes, and snippets.

View hiukky's full-sized avatar
🏝️
~ vacation, back soon!

R o m u l l o hiukky

🏝️
~ vacation, back soon!
View GitHub Profile
@aleclarson
aleclarson / rollup-typescript.md
Last active November 4, 2024 15:40
The best Rollup config for TypeScript libraries

It's 2024. You should use tsup instead of this.


Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking

@basarat
basarat / mixin.ts
Last active August 18, 2023 20:29
export type Class = new (...args: any[]) => any;
export function DisposableMixin<Base extends Class>(base: Base) {
return class extends base {
isDisposed: boolean = false;
dispose() {
this.isDisposed = true;
}
};
}
/**
* Cross-browser support for caretPositionFromPoint.
* This returns a `CaretPosition` like object instead
* of a CaretPosition, since we can't create it for
* browsers that don't support this API.
*/
function caretPositionFromPoint(x: number, y: number): {
offsetNode: Node;
offset: number;
getClientRect(): ClientRect | DOMRect;
@michaeltreat
michaeltreat / mongodb_shell_commands.md
Last active November 6, 2024 18:35
Quick Cheat Sheet for Mongo DB Shell commands.

MongoDB Shell Commands Cheat Sheet.

This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.

Preface:

Mongo Manual can help you with getting started using the Shell.

FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.

@mkjiau
mkjiau / axios-interceptors-refresh-token.js
Last active October 5, 2024 12:38
Axios interceptors for token refreshing and more than 2 async requests available
let isRefreshing = false;
let refreshSubscribers = [];
const instance = axios.create({
baseURL: Config.API_URL,
});
instance.interceptors.response.use(response => {
return response;
}, error => {
@janikvonrotz
janikvonrotz / Install Lets Encrypt and create a free SSL certificate.md
Last active August 29, 2023 10:05
Install Let's Encrypt and create a free SSL certificate #OpenSSL #Markdown

Introduction

Let’s Encrypt is a free, automated, and open certificate authority (CA), run for the public’s benefit. Let’s Encrypt is a service provided by the Internet Security Research Group (ISRG). This guide shows you how you can obtain a free SSL certificate.

Requirements

@vitorbritto
vitorbritto / regex.md
Last active October 17, 2024 19:24
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping