Skip to content

Instantly share code, notes, and snippets.

@konstantindenerz
konstantindenerz / webstorm-live-template-a-story.ts
Last active July 23, 2024 11:52
A WebStorm live template to generate a Storybook's stories file for a specific Angular component. Component Story Format V2
import {Meta, moduleMetadata, StoryObj} from '@storybook/angular';
import {$ComponentName$Component} from './$componentName$.component';
const meta: Meta<$ComponentName$Component> = {
title: '$StoryName$',
component: $ComponentName$Component,
};
export default meta;
type Story = StoryObj<$ComponentName$Component>;
@Icaruk
Icaruk / multipleGitProfiles.md
Last active April 14, 2025 07:50
How to have multiple profiles on git

Last update: 30-01-2024
Last view: 01-05-2025

Step 1

Go to your work folder, mine is located at: F:/Work/EnterpriseName/

And then create a .gitconfig-work with the following data:

@paolocarrasco
paolocarrasco / README.md
Last active April 7, 2025 22:13
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@DrSensor
DrSensor / Advanced Markdown Tricks.md
Last active April 1, 2025 17:22
Advanced Markdown Tricks

Repository

What Will I Learn?

In general, you will learn some markdown tricks combined with standard HTML tags. In more details what you will learn:

  • Hide-show content
  • Writing codeblocks inside codeblocks
  • Combining and using italic, bold, superscript, subscript, and/or strikethrough
  • Quoting long sentence (using nested blockquotes)
@pjmazenot
pjmazenot / docker-install-lubuntu-17.04.sh
Last active March 14, 2021 17:52
Install Docker CE on Lubuntu 17.04
#!/bin/sh
# Install Docker CE on Lubuntu 17.04
# Run this script with sudo privileges `sudo docker-install-lubuntu-17.04.sh`
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable"
apt-get update
apt-get install -y docker-ce
@OliverJAsh
OliverJAsh / foo.ts
Last active January 27, 2025 18:24
Records and dictionaries in TypeScript
/*
In JavaScript, objects can be used to serve various purposes.
To maximise our usage of the type system, we should assign different types to our objects depending
on the desired purpose.
In this blog post I will clarify two common purposes for objects known as records and dictionaries
(aka maps), and how they can both be used with regards to the type system.