This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>jsPDF Example</title> | |
<style> | |
#generate { | |
background-color: #ffc200; | |
padding: 10px; | |
border: none; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set "desktopPath=C:\Users\%username%\Desktop" | |
pushd "%desktopPath%" | |
if exist "%desktopPath%\scaffold" ( | |
echo Folder "scaffold" already exists | |
) else ( | |
echo Starting to clone ... | |
git clone https://github.com/mapledrive/scaffold.git | |
echo Finished cloning repository | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express from 'express'; | |
import pg from 'pg'; | |
import cors from 'cors'; | |
const app = express(); | |
const port = 3001; | |
const { Pool } = pg; | |
const pool = new Pool({database: 'projects', user: 'postgres', password: '12345'}); | |
app.use(cors()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express from 'express'; | |
import { createClient } from '@clickhouse/client'; | |
import cors from 'cors'; | |
const app = express(); | |
const port = 3001; | |
const client = createClient(); | |
app.use(cors()); | |
app.get('/', async (req, res) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express from 'express'; | |
import pg from 'pg'; | |
const app = express(); | |
const port = 3001; | |
const { Pool } = pg; | |
const pool = new Pool({ | |
user: 'postgres', | |
host: 'localhost', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom/client'; | |
import { HTML5Backend } from 'react-dnd-html5-backend'; | |
import update from 'immutability-helper'; | |
import { useCallback, useState } from 'react'; | |
import { DndProvider, useDrop, useDrag } from 'react-dnd'; | |
import styled from 'styled-components'; | |
export const Container = () => { | |
const [boxes, setBoxes] = useState({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 1. Create an empty repository on GitHub: my-app | |
Step 2: Create a React app | |
npx create-react-app my-app | |
Step 3: Install gh-pages | |
npm install gh-pages --save-dev | |
Step 4: Add homepage to package.json after private:true | |
"homepage": "https://mapledrive.github.io/my-app", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { createRoot } from 'react-dom/client'; | |
import { Provider, useSelector, useDispatch } from 'react-redux'; | |
import { configureStore, createSlice } from '@reduxjs/toolkit'; | |
const initialState = { value: 0 }; | |
const slice = createSlice({ | |
name: 'counter', | |
initialState, |