Skip to content

Instantly share code, notes, and snippets.

View unclebay143's full-sized avatar
:octocat:
Building Hashnode

Unclebigbay unclebay143

:octocat:
Building Hashnode
View GitHub Profile
@unclebay143
unclebay143 / Map.jsx
Created December 19, 2022 15:47
Building Maps in React with react-leaflet Library
import React from "react";
import { MapContainer, Marker, Popup, TileLayer } from "react-leaflet";
import { Icon } from "leaflet";
export const Map = () => {
const position = [8.1386, 5.1026];
const zoomLevel = 15;
const swimmingSpot = new Icon({
iconUrl: "/images/computer-solid.svg",
// Import express into our project
const express = require("express");
// Import multer
const multer = require("multer");
// Creating an instance of express function
const app = express();
// The port we want our project to run on
// Import express into our project
const express = require("express");
// Import multer
const multer = require("multer");
// Creating an instance of express function
const app = express();
// Import dotenv
import React, { useState, useEffect } from "react";
import Moralis from "moralis";
import { NftSearchBar } from "../components/Nfts/NftSearchBar";
import { NftCardContainer } from "../components/Nfts/NftCardContainer";
export const NftExplore = ({ settheme }) => {
// 1. loading state
const [loading, setLoading] = useState(false);
// 2. The search query state
// Import express into our project
const express = require("express");
// Import multer
const multer = require("multer");
// Creating an instance of express function
const app = express();
// Import dotenv
[
{
"id": "1",
"title": "Fjallraven - Foldsack No. 1 Backpack, Fits 15 Laptops",
"price": 109.95,
"description": "Your perfect pack for everyday use and walks in the forest. Stash your laptop (up to 15 inches) in the padded sleeve, your everyday",
"category": "men's clothing",
"image": "https://fakestoreapi.com/img/81fPKd-2AYL._AC_SL1500_.jpg"
},
@unclebay143
unclebay143 / complete_todo_list_api_code.js
Last active November 28, 2021 18:34
FULL TODO LIST BACKEND CODE
// import express
const express = require('express');
const app = express();
//Parse URL-encoded bodies - Allows
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
// import cors
var cors = require('cors');
@unclebay143
unclebay143 / charts.css
Last active November 15, 2021 11:44
Chart.js HTML and CSS complete code
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
* {
margin: 0;
box-sizing: border-box;
}
:root {
--primary-color: #0b0d60;
--app-white: #ffffff;
@unclebay143
unclebay143 / bar-chart.js
Created November 15, 2021 11:35
Chart.js - Bar Chart Code
// Grab the bar chart canvas
const barChartContext = document
.getElementById('js-bar-chart')
.getContext('2d');
// Chart configuration
const config = {
type: 'bar',
data: {
// Chart data