Skip to content

Instantly share code, notes, and snippets.

View markusand's full-sized avatar

Marc Vilella markusand

View GitHub Profile
@albertms10
albertms10 / nestedObjectPaths.ts
Last active February 14, 2024 22:34
TypeScript type that represents all possible paths of an object
/**
* Object type that represents all possible paths of an object,
* including optional members.
* @template T The object type to get the paths from.
* @see https://stackoverflow.com/a/76131375/10851645
* @see https://gist.github.com/albertms10/5a8b83e436a1689aa4b425ec22058301
* @example
* interface Package {
* name: string;
* man?: string[];
@zgover
zgover / missing-ts-types.md
Last active February 14, 2023 04:03
[TS Missing Utility Types] Missing utility types for TypeScript #typescript #types #reusable #utility #utility-types

TypeScript utility types missing

Reusable utility types missing from TypeScript core library. Enjoy!

/**
 * The MIT License (MIT)
 *
@Radiergummi
Radiergummi / Cryptor.php
Last active March 3, 2023 13:11
A PHP class to encrypt and decrypt strings using a static application secret. Input is converted to hex strings to enable easier handling
<?php
namespace Vendor\Library;
use function bin2hex;
use function hex2bin;
use function openssl_decrypt;
use function openssl_encrypt;
use function random_bytes;
@serkanyersen
serkanyersen / javascript.json
Last active July 8, 2021 01:34
Eslint snippets for VSCODE
{
"eslint/disable": {
"prefix": "eslint-disable",
"description": "To temporarily disable rule warnings in your file",
"body": [
"/* eslint-disable $rules */"
]
},
"eslint/enable": {
"prefix": "eslint-enable",
@jareware
jareware / SCSS.md
Last active April 23, 2024 22:13
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso