Skip to content

Instantly share code, notes, and snippets.

const MongoClient = require("mongodb").MongoClient;
const MongoServerUrl = "mongodb://localhost:27017";
const Config = {
useNewUrlParser: true
};
MongoClient.connect(MongoServerUrl, Config, (err, client) => {
MongoCrud(client, () => {
@mfrancois3k
mfrancois3k / GitAction preview.yml
Last active October 16, 2023 16:20 — forked from nandorojo/preview.yml
Create EAS Update Preview on each commit
name: Expo Preview
on:
push:
branches: [dev*, preview*]
paths:
- "**.ts"
- "**.tsx"
- "**.js"
- "**.json"
- "**.jsx"
@mfrancois3k
mfrancois3k / layout.js
Created September 1, 2023 15:32
react navigation #React
import './globals.css'
import NavBar from "../app/components/navbar";
export const metadata = {
title: 'Create Next App',
description: 'Gennerated by create next app',
}
export default function RootLayout({
@mfrancois3k
mfrancois3k / Arduino ArduinoCLI.bat
Created June 23, 2023 06:08 — forked from tammymakesthings/ArduinoCLI.bat
Arduino Install Arduino-cli stuff
arduino-cli config set sketchbook_path %HOME%\projects\arduino
arduino-cli core update-index
arduino-cli core install arduino:avr
arduino-cli core install adafruit:avr
arduino-cli core install arduino:samd
arduino-cli core install adafruit:nrf52
arduino-cli core install adafruit:samd
arduino-cli core install adafruit:wiced
arduino-cli core install esp8266:esp8266
/*
*How to display numbers on LCD screen by Arduino uno
*This is a very basic example which will help you to understand how cursor location arrangement can be done on the LCD screen.
*
*for more detail about this project please visit:
*https://arduinounomagic.com/2019/01/how-to-use-lcd-with-arduino-uno.html
*Copyright (C) 2007 Free Software Foundation, Inc. <arduinounomagic@gmail.com>
*for more projects based on Arduino uno please visit: https://arduinounomagic.com/
*/
@mfrancois3k
mfrancois3k / cursor effect
Created June 14, 2023 06:08
cursor effect #awwwards #CSS
/* #Cursor
================================================== */
.cursor,
.cursor2,
.cursor3{
position: fixed;
border-radius: 50%;
transform: translateX(-50%) translateY(-50%);
pointer-events: none;
@mfrancois3k
mfrancois3k / Config Setup Node
Last active June 1, 2023 06:35
fullstack setup
// Lanch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
@mfrancois3k
mfrancois3k / gsap lemp1.js
Last active May 31, 2023 23:51 — forked from amitabhaghosh197/lemp1.js
gsap awwwards wheel scroll functions snippets
function smoothScroll() {
var a = $(window);
a.on("mousewheel DOMMouseScroll", function(b) {
b.preventDefault();
b = b.originalEvent.wheelDelta / 120 || -b.originalEvent.detail / 3;
b = a.scrollTop() - parseInt(280 * b);
TweenMax.to(a, 1.1, {
scrollTo: {
y: b,
autoKill: !0
@mfrancois3k
mfrancois3k / 01 setup
Last active May 31, 2023 16:39
Barba js Basics #CSS #transition #effects
set up
put cdn for html ur using for all the html ur transitioning
<script src="https://unpkg.com/@barba/core"></script>
html structure
<body data-barba="wrapper">
<!-- put here content that will not change
@mfrancois3k
mfrancois3k / barba js main.js
Last active May 24, 2023 02:17 — forked from karanmhatre1/main.js
Barba JS Hooks
transitions: [{
async leave(data) {
const done = this.async();
loadingAnimation();
await delay(1000);
done();
},
enter(data) { contentAnimation(); },