Skip to content

Instantly share code, notes, and snippets.

View silvesterwali's full-sized avatar
:octocat:
Coding lover

Silvester Wali silvesterwali

:octocat:
Coding lover
View GitHub Profile
@kargozeyan
kargozeyan / nuxt-auth-api-plugin.ts
Created April 5, 2026 10:03
Nuxt plugin for handling access/refresh token cookies with external backend (SSR-compatible)
// app/plugins/api.ts
import { appendResponseHeader } from 'h3';
import { parseCookie, parseSetCookie, stringifyCookie } from 'cookie';
export default defineNuxtPlugin(() => {
const event = import.meta.server ? useRequestEvent() : undefined;
// During SSR, we parse the initial browser cookies. During the request lifecycle,
// we update this object with new cookies from backend responses (e.g. after a token refresh).
const cookies = import.meta.server && event ? parseCookie(event.node.req.headers.cookie ?? '') : {};
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active September 5, 2026 16:51
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@victorbruce
victorbruce / Firebase.md
Last active October 1, 2025 18:15
My journey with Firebase so far. Cheatsheet to serve as a quick reference when developing firebase applications

Firebase

Set up firebase and Deploy

  • Head over to firebase. Sign in and create a project.

  • Copy your project settings under Firebase SDK snippet into your local project (ie your project's api key, auth domain, databaseURL, etc)

  • Create a file (firebase.js or config.js Any name that suits you is fine)

@jb0gie
jb0gie / flutter.md
Created February 23, 2019 00:27 — forked from matteocrippa/flutter.md
Flutter Cheatsheet

Flutter

A quick cheatsheet of useful snippet for Flutter

Widget

A widget is the basic type of controller in Flutter Material. There are two type of basic Widget we can extend our classes: StatefulWidget or StatelessWidget.

Stateful

StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like: