Skip to content

Instantly share code, notes, and snippets.

View pedromiranda96's full-sized avatar

Pedro Miranda pedromiranda96

  • Rio de Janeiro, Brasil
View GitHub Profile
@pedromiranda96
pedromiranda96 / settings.json
Created October 15, 2024 20:54 — forked from samselikoff/settings.json
Tweaked Dracula theme for VSCode
{
"diffEditor.renderSideBySide": true,
"editor.fontSize": 14,
"editor.lineHeight": 22,
"editor.tabSize": 2,
"editor.matchBrackets": "never",
"editor.cursorBlinking": "solid",
"editor.selectionHighlight": false,
"editor.occurrencesHighlight": "off",
"editor.scrollbar.horizontal": "hidden",
@pedromiranda96
pedromiranda96 / opportunity.json
Last active September 9, 2024 21:15
Dynamics 365 Opportunity Product
{
"opportunityid": "60586640-3692-eb11-b1ac-000d3a58be1e",
"product_opportunities": [
{
"@odata.etag": "W/\"201645144\"",
"productassociationid": null,
"results_modelo": 2021,
"entityimage": null,
"lineitemnumber": null,
"_createdby_value": "1f873d28-1e8e-ea11-a811-000d3a591fb8",
@pedromiranda96
pedromiranda96 / +page.server.ts
Last active May 26, 2023 13:20
zero-based pagination coming from the url search params
import { ITEMS_PER_PAGE } from '$lib/pagination';
import { prisma } from '$lib/server/prisma';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async ({ url }) => {
const page = Number(url.searchParams.get('page') ?? 0);
if(page < 0) {
// redirect
const redirectUrl = new URL(url);
@pedromiranda96
pedromiranda96 / SelectionModal.svelte
Created May 15, 2023 17:56
Modal component for selecting an item from a list
<script lang="ts">
import {
Dialog,
DialogDescription,
DialogOverlay,
DialogTitle
} from '@rgossiaux/svelte-headlessui';
import { CheckIcon, SearchIcon, XIcon } from 'lucide-svelte';
export let initialItemId: string | undefined;

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example