Skip to content

Instantly share code, notes, and snippets.

View guillaumeduhan's full-sized avatar
💭
Vue 3, Next & Supabase!

Guillaume Duhan guillaumeduhan

💭
Vue 3, Next & Supabase!
View GitHub Profile
@guillaumeduhan
guillaumeduhan / ncom.js
Created December 7, 2023 13:27
Generate a .TSX file [snippet vscode]
"ncomp": {
"scope": "javascriptreact,typescriptreact,tsx",
"prefix": "ncomp",
"body": [
"'use client';",
"export default function $TM_FILENAME_BASE() {",
"return <div>New component with filename</div>;",
"}"
]
},
@guillaumeduhan
guillaumeduhan / firebase.js
Last active March 29, 2021 16:30
firebase_services
import firebase from 'firebase/app'
import 'firebase/auth'
import 'firebase/firestore'
import 'firebase/database'
import moment from 'moment'
function CREATE_DOCUMENT(collection, obj) {
return new Promise((resolve, reject) => {
firebase
.firestore()
@sturmenta
sturmenta / comments.md
Last active October 1, 2021 17:52
Firebase Functions Send Mail
@mxstbr
mxstbr / Readme.md
Last active December 20, 2023 12:01
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
@DavidWells
DavidWells / reset.css
Last active May 4, 2024 20:04 — forked from karbassi/reset.css
CSS reset. Follow me on the twitters for more tips: https://twitter.com/davidwells
/* http://meyerweb.com/eric/tools/css/reset/
v2.0-modified | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@solenoid
solenoid / gist:1372386
Created November 17, 2011 04:49
javascript ObjectId generator
var mongoObjectId = function () {
var timestamp = (new Date().getTime() / 1000 | 0).toString(16);
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() {
return (Math.random() * 16 | 0).toString(16);
}).toLowerCase();
};