├── react-redux ├── base │ ├── .env │ ├── src │ │ ├── index.scss │ │ ├── components │ │ │ ├── App.js │ │ │ └── HomePage.js │ │ └── index.js │ ├── postcss.config.js │ ├── README.md │ ├── .babelrc │ ├── .gitignore │ ├── public │ │ └── index.html │ ├── LICENSE │ ├── .eslintrc │ └── package.json └── done │ ├── .env │ ├── src │ ├── index.scss │ ├── types.js │ ├── rootReducer.js │ ├── components │ │ ├── App.js │ │ └── HomePage.js │ ├── store.js │ ├── reducers │ │ └── users.js │ ├── actions │ │ └── users.js │ └── index.js │ ├── postcss.config.js │ ├── README.md │ ├── .babelrc │ ├── .gitignore │ ├── public │ └── index.html │ ├── debug.log │ ├── LICENSE │ ├── .eslintrc │ └── package.json ├── express-heroku ├── .gitignore ├── index.js └── package.json ├── react-flask-stripe ├── base │ ├── react-app │ │ ├── .env │ │ ├── src │ │ │ ├── index.scss │ │ │ ├── components │ │ │ │ ├── App.js │ │ │ │ └── HomePage.js │ │ │ └── index.js │ │ ├── postcss.config.js │ │ ├── README.md │ │ ├── .babelrc │ │ ├── .gitignore │ │ ├── public │ │ │ └── index.html │ │ ├── LICENSE │ │ ├── .eslintrc │ │ └── package.json │ └── flask-api │ │ ├── .vscode │ │ └── settings.json │ │ ├── requirements.txt │ │ └── main.py ├── subscriptions │ ├── react-app │ │ ├── .env │ │ ├── postcss.config.js │ │ ├── .babelrc │ │ ├── README.md │ │ ├── src │ │ │ ├── index.js │ │ │ ├── components │ │ │ │ ├── App.js │ │ │ │ └── CardInput.js │ │ │ └── index.scss │ │ ├── .gitignore │ │ ├── public │ │ │ └── index.html │ │ ├── LICENSE │ │ ├── .eslintrc │ │ └── package.json │ └── flask-api │ │ ├── .vscode │ │ └── settings.json │ │ └── requirements.txt └── payment-and-hooks │ ├── react-app │ ├── .env │ ├── postcss.config.js │ ├── .babelrc │ ├── README.md │ ├── src │ │ ├── index.js │ │ ├── components │ │ │ ├── App.js │ │ │ └── CardInput.js │ │ └── index.scss │ ├── .gitignore │ ├── public │ │ └── index.html │ ├── LICENSE │ ├── .eslintrc │ └── package.json │ └── flask-api │ ├── .vscode │ └── settings.json │ ├── requirements.txt │ └── main.py ├── react-express-stripe ├── base │ ├── react-app │ │ ├── .env │ │ ├── src │ │ │ ├── index.scss │ │ │ ├── components │ │ │ │ ├── App.js │ │ │ │ └── HomePage.js │ │ │ └── index.js │ │ ├── postcss.config.js │ │ ├── README.md │ │ ├── .babelrc │ │ ├── .gitignore │ │ ├── public │ │ │ └── index.html │ │ ├── LICENSE │ │ ├── .eslintrc │ │ └── package.json │ └── express-api │ │ ├── index.js │ │ ├── package.json │ │ └── .gitignore ├── one-time-payment │ ├── react-app │ │ ├── .env │ │ ├── postcss.config.js │ │ ├── README.md │ │ ├── .babelrc │ │ ├── src │ │ │ ├── index.js │ │ │ ├── components │ │ │ │ ├── App.js │ │ │ │ └── CardInput.js │ │ │ └── index.scss │ │ ├── .gitignore │ │ ├── public │ │ │ └── index.html │ │ ├── LICENSE │ │ ├── .eslintrc │ │ └── package.json │ └── express-api │ │ ├── package.json │ │ ├── index.js │ │ └── .gitignore ├── webhooks │ ├── react-app │ │ ├── .env │ │ ├── postcss.config.js │ │ ├── README.md │ │ ├── .babelrc │ │ ├── src │ │ │ ├── index.js │ │ │ ├── components │ │ │ │ ├── App.js │ │ │ │ └── CardInput.js │ │ │ └── index.scss │ │ ├── .gitignore │ │ ├── public │ │ │ └── index.html │ │ ├── LICENSE │ │ ├── .eslintrc │ │ └── package.json │ └── express-api │ │ ├── package.json │ │ └── .gitignore └── subscription │ ├── react-app │ ├── .env │ ├── postcss.config.js │ ├── README.md │ ├── .babelrc │ ├── src │ │ ├── index.js │ │ ├── components │ │ │ ├── App.js │ │ │ └── CardInput.js │ │ └── index.scss │ ├── .gitignore │ ├── public │ │ └── index.html │ ├── LICENSE │ ├── .eslintrc │ └── package.json │ └── express-api │ ├── package.json │ ├── index.js │ └── .gitignore ├── express-dotenv ├── .env ├── routes │ └── example.js ├── index.js ├── package.json └── .gitignore ├── flask-dotenv ├── done │ ├── .env │ ├── requiremnts.txt │ └── app.py └── base │ ├── requiremnts.txt │ └── app.py ├── py-discord-bot ├── disc_conf.py ├── requirements.txt └── app.py ├── flask-bcrypt ├── db.py ├── .vscode │ ├── settings.json │ └── launch.json ├── user.db ├── requirements.txt ├── models.py └── main.py ├── flask-jwt-auth ├── db.py ├── .vscode │ ├── settings.json │ └── launch.json ├── user.db ├── requirements.txt └── models.py ├── react-ultimate-click-outside ├── src │ ├── vite-env.d.ts │ ├── App.tsx │ ├── main.tsx │ ├── useClickOutside.ts │ ├── useClickOutsideMultiple.ts │ ├── Simple.tsx │ └── Multiple.tsx ├── tsconfig.json ├── vite.config.ts ├── .gitignore ├── index.html ├── tsconfig.node.json ├── tsconfig.app.json ├── package.json ├── eslint.config.js └── README.md ├── simple-press-detect ├── src │ ├── react-app-env.d.ts │ ├── setupTests.ts │ ├── App.test.tsx │ ├── index.css │ ├── reportWebVitals.ts │ ├── index.tsx │ ├── App.css │ ├── App.tsx │ └── logo.svg ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── tsconfig.json ├── package.json └── README.md ├── js-discord-bot ├── config.json ├── package.json ├── index.js └── .gitignore ├── express-bcrypt ├── db.db ├── package.json └── .gitignore ├── express-jwt-auth ├── db.db ├── package.json ├── helpers │ └── auth.js └── .gitignore ├── flask-file-upload ├── base │ ├── req.txt │ ├── models.py │ ├── db.py │ ├── index.html │ └── app.py └── done │ ├── req.txt │ ├── models.py │ ├── db.py │ ├── index.html │ └── app.py ├── py-websockets ├── requirments.txt ├── app.py └── clients │ ├── index.html │ └── index2.html ├── express-file-upload ├── base │ ├── img.db │ ├── index.html │ ├── package.json │ ├── index.js │ └── .gitignore └── done │ ├── img.db │ ├── index.html │ ├── package.json │ ├── index.js │ └── .gitignore ├── flask-email ├── base │ ├── requirements.txt │ └── app.py └── done │ ├── requirements.txt │ └── app.py ├── flask-google-oauth2 ├── requirements.txt ├── .env └── auth_decorator.py ├── js-express-websockets ├── base │ ├── index.js │ ├── package.json │ ├── clients │ │ ├── index.html │ │ └── index2.html │ └── .gitignore └── done │ ├── package.json │ ├── index.js │ ├── clients │ ├── index.html │ └── index2.html │ └── .gitignore ├── express-email ├── base │ ├── package.json │ ├── index.js │ └── .gitignore └── done │ ├── package.json │ ├── index.js │ └── .gitignore ├── express-google-oauth2 ├── base │ ├── package.json │ ├── index.js │ └── .gitignore └── done │ ├── package.json │ ├── README.md │ ├── passport-setup.js │ ├── index.js │ └── .gitignore ├── LICENSE └── README.md /react-redux/base/.env: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-redux/done/.env: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-redux/base/src/index.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-redux/done/src/index.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /express-heroku/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules -------------------------------------------------------------------------------- /react-flask-stripe/base/react-app/.env: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-express-stripe/base/react-app/.env: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-flask-stripe/base/react-app/src/index.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-express-stripe/base/react-app/src/index.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/react-app/.env: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /express-dotenv/.env: -------------------------------------------------------------------------------- 1 | PORT="3000" 2 | SECRET_VALUE="SOME SECRET BRO!" -------------------------------------------------------------------------------- /flask-dotenv/done/.env: -------------------------------------------------------------------------------- 1 | MEANING_OF_LIFE=42 2 | SECRET_NAME="Jimmy" -------------------------------------------------------------------------------- /py-discord-bot/disc_conf.py: -------------------------------------------------------------------------------- 1 | TOKEN = 'NzA...' 2 | PREFIX = '!' 3 | -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/react-app/.env: -------------------------------------------------------------------------------- 1 | PUB_KEY='pk_test_...' -------------------------------------------------------------------------------- /react-express-stripe/webhooks/react-app/.env: -------------------------------------------------------------------------------- 1 | STRIPE_PUB_KEY='pk_test_u...' -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/react-app/.env: -------------------------------------------------------------------------------- 1 | PUB_KEY='pk_test_....' -------------------------------------------------------------------------------- /react-redux/done/src/types.js: -------------------------------------------------------------------------------- 1 | export const USERS_SET = 'USERS_SET'; 2 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/react-app/.env: -------------------------------------------------------------------------------- 1 | STRIPE_PUB_KEY='pk_test_u...' -------------------------------------------------------------------------------- /flask-bcrypt/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() -------------------------------------------------------------------------------- /flask-jwt-auth/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() -------------------------------------------------------------------------------- /react-ultimate-click-outside/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /simple-press-detect/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /js-discord-bot/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "NzAzN..........", 3 | "prefix": "!" 4 | } -------------------------------------------------------------------------------- /express-bcrypt/db.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/express-bcrypt/db.db -------------------------------------------------------------------------------- /flask-bcrypt/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "venv\\Scripts\\python.exe" 3 | } -------------------------------------------------------------------------------- /flask-bcrypt/user.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/flask-bcrypt/user.db -------------------------------------------------------------------------------- /express-jwt-auth/db.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/express-jwt-auth/db.db -------------------------------------------------------------------------------- /flask-jwt-auth/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "venv\\Scripts\\python.exe" 3 | } -------------------------------------------------------------------------------- /flask-jwt-auth/user.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/flask-jwt-auth/user.db -------------------------------------------------------------------------------- /flask-bcrypt/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/flask-bcrypt/requirements.txt -------------------------------------------------------------------------------- /flask-file-upload/base/req.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/flask-file-upload/base/req.txt -------------------------------------------------------------------------------- /flask-file-upload/done/req.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/flask-file-upload/done/req.txt -------------------------------------------------------------------------------- /py-websockets/requirments.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/py-websockets/requirments.txt -------------------------------------------------------------------------------- /simple-press-detect/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /express-file-upload/base/img.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/express-file-upload/base/img.db -------------------------------------------------------------------------------- /express-file-upload/done/img.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/express-file-upload/done/img.db -------------------------------------------------------------------------------- /flask-dotenv/base/requiremnts.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/flask-dotenv/base/requiremnts.txt -------------------------------------------------------------------------------- /flask-dotenv/done/requiremnts.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/flask-dotenv/done/requiremnts.txt -------------------------------------------------------------------------------- /flask-email/base/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/flask-email/base/requirements.txt -------------------------------------------------------------------------------- /flask-email/done/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/flask-email/done/requirements.txt -------------------------------------------------------------------------------- /flask-jwt-auth/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/flask-jwt-auth/requirements.txt -------------------------------------------------------------------------------- /py-discord-bot/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/py-discord-bot/requirements.txt -------------------------------------------------------------------------------- /react-flask-stripe/base/flask-api/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "venv\\Scripts\\python.exe" 3 | } -------------------------------------------------------------------------------- /react-redux/base/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('autoprefixer'), 4 | ], 5 | }; 6 | -------------------------------------------------------------------------------- /react-redux/done/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('autoprefixer'), 4 | ], 5 | }; 6 | -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/flask-api/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "venv\\Scripts\\python.exe" 3 | } -------------------------------------------------------------------------------- /flask-google-oauth2/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/flask-google-oauth2/requirements.txt -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/flask-api/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "venv\\Scripts\\python.exe" 3 | } -------------------------------------------------------------------------------- /simple-press-detect/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/simple-press-detect/public/favicon.ico -------------------------------------------------------------------------------- /simple-press-detect/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/simple-press-detect/public/logo192.png -------------------------------------------------------------------------------- /simple-press-detect/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/simple-press-detect/public/logo512.png -------------------------------------------------------------------------------- /react-express-stripe/base/react-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('autoprefixer'), 4 | ], 5 | }; 6 | -------------------------------------------------------------------------------- /react-flask-stripe/base/react-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('autoprefixer'), 4 | ], 5 | }; 6 | -------------------------------------------------------------------------------- /react-express-stripe/webhooks/react-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('autoprefixer'), 4 | ], 5 | }; 6 | -------------------------------------------------------------------------------- /react-redux/base/README.md: -------------------------------------------------------------------------------- 1 | # Simple React APP with Redux 2 | * Webpack 4 3 | * React 4 | * Materail UI React 5 | * Linting (ESLint) 6 | -------------------------------------------------------------------------------- /react-redux/done/README.md: -------------------------------------------------------------------------------- 1 | # Simple React APP with Redux 2 | * Webpack 4 3 | * React 4 | * Materail UI React 5 | * Linting (ESLint) 6 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/react-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('autoprefixer'), 4 | ], 5 | }; 6 | -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/react-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('autoprefixer'), 4 | ], 5 | }; 6 | -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/react-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('autoprefixer'), 4 | ], 5 | }; 6 | -------------------------------------------------------------------------------- /flask-google-oauth2/.env: -------------------------------------------------------------------------------- 1 | APP_SECRET_KEY='very secret key' 2 | GOOGLE_CLIENT_ID='20833......apps.googleusercontent.com' 3 | GOOGLE_CLIENT_SECRET='jmiJXU....' -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/react-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('autoprefixer'), 4 | ], 5 | }; 6 | -------------------------------------------------------------------------------- /react-flask-stripe/base/flask-api/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/react-flask-stripe/base/flask-api/requirements.txt -------------------------------------------------------------------------------- /flask-dotenv/base/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask 2 | app = Flask(__name__) 3 | 4 | 5 | @app.route('/') 6 | def hello_world(): 7 | return 'Hello, World!' 8 | -------------------------------------------------------------------------------- /react-flask-stripe/base/react-app/README.md: -------------------------------------------------------------------------------- 1 | # Simple React APP with Stripe 2 | * Webpack 4 3 | * React 4 | * Materail UI React 5 | * Linting (ESLint) 6 | -------------------------------------------------------------------------------- /flask-email/base/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask 2 | 3 | app = Flask(__name__) 4 | 5 | 6 | @app.route('/') 7 | def hello_world(): 8 | return 'Hello, World!' 9 | -------------------------------------------------------------------------------- /react-express-stripe/base/react-app/README.md: -------------------------------------------------------------------------------- 1 | # Simple React APP with Stripe 2 | * Webpack 4 3 | * React 4 | * Materail UI React 5 | * Linting (ESLint) 6 | -------------------------------------------------------------------------------- /react-express-stripe/webhooks/react-app/README.md: -------------------------------------------------------------------------------- 1 | # Simple React APP with Stripe 2 | * Webpack 4 3 | * React 4 | * Materail UI React 5 | * Linting (ESLint) 6 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/react-app/README.md: -------------------------------------------------------------------------------- 1 | # Simple React APP with Stripe 2 | * Webpack 4 3 | * React 4 | * Materail UI React 5 | * Linting (ESLint) 6 | -------------------------------------------------------------------------------- /react-flask-stripe/base/flask-api/main.py: -------------------------------------------------------------------------------- 1 | from flask import Flask 2 | app = Flask(__name__) 3 | 4 | @app.route('/') 5 | def hello_world(): 6 | return 'Hello, World!' -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/react-app/README.md: -------------------------------------------------------------------------------- 1 | # Simple React APP with Stripe 2 | * Webpack 4 3 | * React 4 | * Materail UI React 5 | * Linting (ESLint) 6 | -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/flask-api/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/react-flask-stripe/subscriptions/flask-api/requirements.txt -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/flask-api/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vuka951/tutorial-code/HEAD/react-flask-stripe/payment-and-hooks/flask-api/requirements.txt -------------------------------------------------------------------------------- /react-redux/base/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react" 5 | ], 6 | "plugins": ["@babel/plugin-transform-runtime"] 7 | } -------------------------------------------------------------------------------- /react-redux/done/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react" 5 | ], 6 | "plugins": ["@babel/plugin-transform-runtime"] 7 | } -------------------------------------------------------------------------------- /react-ultimate-click-outside/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.app.json" }, 5 | { "path": "./tsconfig.node.json" } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /react-express-stripe/base/react-app/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react" 5 | ], 6 | "plugins": ["@babel/plugin-transform-runtime"] 7 | } -------------------------------------------------------------------------------- /react-flask-stripe/base/react-app/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react" 5 | ], 6 | "plugins": ["@babel/plugin-transform-runtime"] 7 | } -------------------------------------------------------------------------------- /react-express-stripe/webhooks/react-app/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react" 5 | ], 6 | "plugins": ["@babel/plugin-transform-runtime"] 7 | } -------------------------------------------------------------------------------- /react-express-stripe/subscription/react-app/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react" 5 | ], 6 | "plugins": ["@babel/plugin-transform-runtime"] 7 | } -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/react-app/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react" 5 | ], 6 | "plugins": ["@babel/plugin-transform-runtime"] 7 | } -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/react-app/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react" 5 | ], 6 | "plugins": ["@babel/plugin-transform-runtime"] 7 | } -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/react-app/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react" 5 | ], 6 | "plugins": ["@babel/plugin-transform-runtime"] 7 | } -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/react-app/README.md: -------------------------------------------------------------------------------- 1 | # Simple React APP with Stripe 2 | 3 | * Webpack 4 4 | * React 5 | * Materail UI React 6 | * Linting (ESLint) 7 | 8 | Note: Stripe pub key in the .env file -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/react-app/README.md: -------------------------------------------------------------------------------- 1 | # Simple React APP with Stripe 2 | 3 | * Webpack 4 4 | * React 5 | * Materail UI React 6 | * Linting (ESLint) 7 | 8 | Note: Stripe pub key in the .env file -------------------------------------------------------------------------------- /react-redux/done/src/rootReducer.js: -------------------------------------------------------------------------------- 1 | import {combineReducers} from 'redux'; 2 | import {users} from './reducers/users'; 3 | 4 | const rootReducer = combineReducers({ 5 | users, 6 | }); 7 | 8 | export default rootReducer; 9 | -------------------------------------------------------------------------------- /react-ultimate-click-outside/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /flask-bcrypt/models.py: -------------------------------------------------------------------------------- 1 | from db import db 2 | 3 | class User(db.Model): 4 | id = db.Column(db.Integer, primary_key=True) 5 | email = db.Column(db.Text, unique=True, nullable=False) 6 | hash = db.Column(db.Text, nullable=False) -------------------------------------------------------------------------------- /flask-jwt-auth/models.py: -------------------------------------------------------------------------------- 1 | from db import db 2 | 3 | class User(db.Model): 4 | id = db.Column(db.Integer, primary_key=True) 5 | email = db.Column(db.Text, unique=True, nullable=False) 6 | hash = db.Column(db.Text, nullable=False) -------------------------------------------------------------------------------- /express-dotenv/routes/example.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | 3 | const router = express.Router(); 4 | 5 | router.get('/', function(req, res) { 6 | res.status(200).send(process.env.SECRET_VALUE); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /react-ultimate-click-outside/src/App.tsx: -------------------------------------------------------------------------------- 1 | import Multiple from "./Multiple"; 2 | import Simple from "./Simple"; 3 | 4 | export default function App() { 5 | return ( 6 | <> 7 | 8 | 9 | 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /react-redux/base/src/components/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // Components 3 | import HomePage from './HomePage'; 4 | // Styles 5 | import '../index.scss'; 6 | 7 | function App() { 8 | return ( 9 | 10 | ); 11 | } 12 | 13 | export default App; 14 | -------------------------------------------------------------------------------- /react-redux/done/src/components/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // Components 3 | import HomePage from './HomePage'; 4 | // Styles 5 | import '../index.scss'; 6 | 7 | function App() { 8 | return ( 9 | 10 | ); 11 | } 12 | 13 | export default App; 14 | -------------------------------------------------------------------------------- /express-heroku/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const app = express(); 3 | const port = 3000; 4 | 5 | app.get('/', (req, res) => res.send('Hello World!')); 6 | 7 | app.listen(process.env.PORT || port, () => console.log(`Example app listening at http://localhost:${port}`)); -------------------------------------------------------------------------------- /js-express-websockets/base/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const app = express() 3 | const server = require('http').createServer(app); 4 | 5 | app.get('/', (req, res) => res.send('Hello World!')) 6 | 7 | server.listen(3000, () => console.log(`Lisening on port :3000`)) 8 | -------------------------------------------------------------------------------- /simple-press-detect/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /react-ultimate-click-outside/src/main.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import App from "./App.tsx"; 4 | 5 | createRoot(document.getElementById("root")!).render( 6 | 7 | 8 | 9 | ); 10 | -------------------------------------------------------------------------------- /flask-file-upload/base/models.py: -------------------------------------------------------------------------------- 1 | from db import db 2 | 3 | 4 | class Img(db.Model): 5 | id = db.Column(db.Integer, primary_key=True) 6 | img = db.Column(db.Text, unique=True, nullable=False) 7 | name = db.Column(db.Text, nullable=False) 8 | mimetype = db.Column(db.Text, nullable=False) 9 | -------------------------------------------------------------------------------- /flask-file-upload/done/models.py: -------------------------------------------------------------------------------- 1 | from db import db 2 | 3 | 4 | class Img(db.Model): 5 | id = db.Column(db.Integer, primary_key=True) 6 | img = db.Column(db.Text, unique=True, nullable=False) 7 | name = db.Column(db.Text, nullable=False) 8 | mimetype = db.Column(db.Text, nullable=False) 9 | -------------------------------------------------------------------------------- /react-express-stripe/base/react-app/src/components/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // Components 3 | import HomePage from './HomePage'; 4 | // Styles 5 | import '../index.scss'; 6 | 7 | function App() { 8 | return ( 9 | 10 | ); 11 | } 12 | 13 | export default App; 14 | -------------------------------------------------------------------------------- /react-flask-stripe/base/react-app/src/components/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // Components 3 | import HomePage from './HomePage'; 4 | // Styles 5 | import '../index.scss'; 6 | 7 | function App() { 8 | return ( 9 | 10 | ); 11 | } 12 | 13 | export default App; 14 | -------------------------------------------------------------------------------- /flask-dotenv/done/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask 2 | from dotenv import load_dotenv 3 | import os 4 | load_dotenv() 5 | app = Flask(__name__) 6 | 7 | 8 | @app.route('/') 9 | def hello_world(): 10 | return f'Hello, {os.getenv("SECRET_NAME")}, the menaing of life is {os.getenv("MEANING_OF_LIFE")}' 11 | -------------------------------------------------------------------------------- /react-express-stripe/base/express-api/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const app = express() 3 | const cors = require('cors') 4 | const port = 3000 5 | 6 | app.use(cors()) 7 | 8 | app.get('/', (req, res) => res.send('Hello World!')) 9 | 10 | app.listen(port, () => console.log(`Example app listening on port ${port}!`)) -------------------------------------------------------------------------------- /simple-press-detect/src/App.test.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render, screen } from '@testing-library/react'; 3 | import App from './App'; 4 | 5 | test('renders bulb off img', () => { 6 | render(); 7 | const bulbOffImg = screen.getByAltText('bulb-off'); 8 | expect(bulbOffImg).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /express-heroku/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "herokudeploy", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "express": "^4.17.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /flask-file-upload/base/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | 5 | 6 | # Function that initializes the db and creates the tables 7 | def db_init(app): 8 | db.init_app(app) 9 | 10 | # Creates the tables if the db doesnt already exist 11 | with app.app_context(): 12 | db.create_all() 13 | -------------------------------------------------------------------------------- /js-express-websockets/base/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-sockets", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "express": "^4.17.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /flask-file-upload/done/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | 5 | 6 | # Function that initializes the db and creates the tables 7 | def db_init(app): 8 | db.init_app(app) 9 | 10 | # Creates the logs tables if the db doesnt already exist 11 | with app.app_context(): 12 | db.create_all() 13 | -------------------------------------------------------------------------------- /react-redux/done/src/store.js: -------------------------------------------------------------------------------- 1 | import {createStore, applyMiddleware} from 'redux'; 2 | import {composeWithDevTools} from 'redux-devtools-extension'; 3 | import thunk from 'redux-thunk'; 4 | import rootReducer from './rootReducer'; 5 | 6 | export const store = createStore( 7 | rootReducer, 8 | composeWithDevTools(applyMiddleware(thunk)), 9 | ); 10 | -------------------------------------------------------------------------------- /express-email/base/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express-email", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index" 8 | }, 9 | "author": "Vuka", 10 | "license": "ISC", 11 | "dependencies": { 12 | "body-parser": "^1.19.0", 13 | "express": "^4.17.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /js-express-websockets/base/clients/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Socket Thing1 7 | 8 | 9 | Client1 10 | 11 | 12 | 14 | -------------------------------------------------------------------------------- /js-express-websockets/base/clients/index2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Socket Thing2 7 | 8 | 9 | Client2 10 | 11 | 12 | 14 | -------------------------------------------------------------------------------- /react-redux/done/src/reducers/users.js: -------------------------------------------------------------------------------- 1 | import {USERS_SET} from '../types'; 2 | 3 | const initialState = { 4 | listOfUsers: [], 5 | }; 6 | 7 | export function users(state = initialState, action) { 8 | switch (action.type) { 9 | case USERS_SET: 10 | return {...state, listOfUsers: action.payload}; 11 | default: 12 | return state; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /express-dotenv/index.js: -------------------------------------------------------------------------------- 1 | require('dotenv').config() 2 | const express = require('express') 3 | const app = express() 4 | const testRoute = require('./routes/example'); 5 | 6 | app.get('/', (req, res) => res.send('Hello World!')) 7 | app.use('/test', testRoute) 8 | 9 | app.listen(process.env.PORT, () => console.log(`Example app listening at http://localhost:${process.env.PORT}`)) -------------------------------------------------------------------------------- /js-express-websockets/done/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-sockets", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "express": "^4.17.1", 14 | "ws": "^7.3.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /react-redux/base/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | import App from './components/App'; 5 | import CssBaseline from '@material-ui/core/CssBaseline'; 6 | 7 | ReactDOM.render( 8 | <> 9 | 10 | 11 | , 12 | document.getElementById('app') 13 | ); 14 | 15 | module.hot.accept(); 16 | -------------------------------------------------------------------------------- /js-discord-bot/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-discord-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index" 8 | }, 9 | "keywords": [], 10 | "author": "Vuka", 11 | "license": "ISC", 12 | "dependencies": { 13 | "discord.js": "^12.2.0", 14 | "ytsr": "^0.1.12" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /react-express-stripe/base/react-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | import App from './components/App'; 5 | import CssBaseline from '@material-ui/core/CssBaseline'; 6 | 7 | ReactDOM.render( 8 | <> 9 | 10 | 11 | , 12 | document.getElementById('app') 13 | ); 14 | 15 | module.hot.accept(); 16 | -------------------------------------------------------------------------------- /react-flask-stripe/base/react-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | import App from './components/App'; 5 | import CssBaseline from '@material-ui/core/CssBaseline'; 6 | 7 | ReactDOM.render( 8 | <> 9 | 10 | 11 | , 12 | document.getElementById('app') 13 | ); 14 | 15 | module.hot.accept(); 16 | -------------------------------------------------------------------------------- /express-email/done/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express-email", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index" 8 | }, 9 | "author": "Vuka", 10 | "license": "ISC", 11 | "dependencies": { 12 | "body-parser": "^1.19.0", 13 | "express": "^4.17.1", 14 | "nodemailer": "^6.4.6" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /express-google-oauth2/base/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "exp-oauth2", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "author": "vuka", 10 | "license": "MIT", 11 | "dependencies": { 12 | "body-parser": "^1.19.0", 13 | "cors": "^2.8.5", 14 | "express": "^4.17.1" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /react-express-stripe/base/express-api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express-api", 3 | "version": "1.0.0", 4 | "description": "Barebones Express app", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "author": "Vuka", 10 | "license": "ISC", 11 | "dependencies": { 12 | "cors": "^2.8.5", 13 | "express": "^4.17.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /react-express-stripe/webhooks/react-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | import App from './components/App'; 5 | import CssBaseline from '@material-ui/core/CssBaseline'; 6 | 7 | ReactDOM.render( 8 | <> 9 | 10 | 11 | , 12 | document.getElementById('app') 13 | ); 14 | 15 | module.hot.accept(); 16 | -------------------------------------------------------------------------------- /express-dotenv/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "env-var", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "Vuka", 11 | "license": "ISC", 12 | "dependencies": { 13 | "dotenv": "^8.2.0", 14 | "express": "^4.17.1" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /flask-file-upload/base/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MY APP 6 | 7 | 8 | 9 |
10 | 11 | 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /flask-file-upload/done/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MY APP 6 | 7 | 8 | 9 |
10 | 11 | 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/react-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | import App from './components/App'; 5 | import CssBaseline from '@material-ui/core/CssBaseline'; 6 | 7 | ReactDOM.render( 8 | <> 9 | 10 | 11 | , 12 | document.getElementById('app') 13 | ); 14 | 15 | module.hot.accept(); 16 | -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/react-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | import App from './components/App'; 5 | import CssBaseline from '@material-ui/core/CssBaseline'; 6 | 7 | ReactDOM.render( 8 | <> 9 | 10 | 11 | , 12 | document.getElementById('app') 13 | ); 14 | 15 | module.hot.accept(); 16 | -------------------------------------------------------------------------------- /express-file-upload/base/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MY APP 6 | 7 | 8 | 9 |
10 | 11 | 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /express-file-upload/done/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MY APP 6 | 7 | 8 | 9 |
10 | 11 | 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/react-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | import App from './components/App'; 5 | import CssBaseline from '@material-ui/core/CssBaseline'; 6 | 7 | ReactDOM.render( 8 | <> 9 | 10 | 11 | , 12 | document.getElementById('app') 13 | ); 14 | 15 | module.hot.accept(); 16 | -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/react-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | import App from './components/App'; 5 | import CssBaseline from '@material-ui/core/CssBaseline'; 6 | 7 | ReactDOM.render( 8 | <> 9 | 10 | 11 | , 12 | document.getElementById('app') 13 | ); 14 | 15 | module.hot.accept(); 16 | -------------------------------------------------------------------------------- /react-ultimate-click-outside/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /react-ultimate-click-outside/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | React Ultimate Click Outside 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /react-redux/done/src/actions/users.js: -------------------------------------------------------------------------------- 1 | import {USERS_SET} from '../types'; 2 | import axios from 'axios'; 3 | 4 | const usersSet = (users) => ({ 5 | type: USERS_SET, 6 | payload: users, 7 | }); 8 | 9 | export const fetchUsers = () => async (dispatch) => { 10 | const res = await axios.get('https://jsonplaceholder.typicode.com/users'); 11 | const users = res.data; 12 | dispatch(usersSet(users)); 13 | }; 14 | -------------------------------------------------------------------------------- /express-file-upload/base/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express-file-upload", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index" 8 | }, 9 | "author": "Vuka", 10 | "license": "ISC", 11 | "dependencies": { 12 | "body-parser": "^1.19.0", 13 | "express": "^4.17.1", 14 | "knex": "^0.21.1", 15 | "sqlite3": "^4.2.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /react-redux/base/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.vscode 6 | 7 | # testing 8 | /coverage 9 | 10 | # production 11 | /build 12 | /dist 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /react-redux/done/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.vscode 6 | 7 | # testing 8 | /coverage 9 | 10 | # production 11 | /build 12 | /dist 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /flask-file-upload/base/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask 2 | 3 | from db import db_init 4 | 5 | app = Flask(__name__) 6 | # SQLAlchemy config. Read more: https://flask-sqlalchemy.palletsprojects.com/en/2.x/ 7 | app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///img.db' 8 | app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False 9 | db_init(app) 10 | 11 | 12 | @app.route('/') 13 | def hello_world(): 14 | return 'Hello, World!' 15 | -------------------------------------------------------------------------------- /react-express-stripe/base/react-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.vscode 6 | 7 | # testing 8 | /coverage 9 | 10 | # production 11 | /build 12 | /dist 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /react-flask-stripe/base/react-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.vscode 6 | 7 | # testing 8 | /coverage 9 | 10 | # production 11 | /build 12 | /dist 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /react-express-stripe/webhooks/react-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.vscode 6 | 7 | # testing 8 | /coverage 9 | 10 | # production 11 | /build 12 | /dist 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/react-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.vscode 6 | 7 | # testing 8 | /coverage 9 | 10 | # production 11 | /build 12 | /dist 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/react-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.vscode 6 | 7 | # testing 8 | /coverage 9 | 10 | # production 11 | /build 12 | /dist 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/react-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.vscode 6 | 7 | # testing 8 | /coverage 9 | 10 | # production 11 | /build 12 | /dist 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/react-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.vscode 6 | 7 | # testing 8 | /coverage 9 | 10 | # production 11 | /build 12 | /dist 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /simple-press-detect/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /react-express-stripe/webhooks/express-api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express-api", 3 | "version": "1.0.0", 4 | "description": "Barebones Express app", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "author": "Vuka", 10 | "license": "ISC", 11 | "dependencies": { 12 | "body-parser": "^1.19.0", 13 | "cors": "^2.8.5", 14 | "express": "^4.17.1", 15 | "stripe": "^8.32.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/express-api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express-api", 3 | "version": "1.0.0", 4 | "description": "Barebones Express app", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "author": "Vuka", 10 | "license": "ISC", 11 | "dependencies": { 12 | "body-parser": "^1.19.0", 13 | "cors": "^2.8.5", 14 | "express": "^4.17.1", 15 | "stripe": "^8.32.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/express-api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express-api", 3 | "version": "1.0.0", 4 | "description": "Barebones Express app", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "author": "Vuka", 10 | "license": "ISC", 11 | "dependencies": { 12 | "body-parser": "^1.19.0", 13 | "cors": "^2.8.5", 14 | "express": "^4.17.1", 15 | "stripe": "^8.32.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /react-redux/done/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import {Provider} from 'react-redux'; 4 | import {store} from './store'; 5 | 6 | import App from './components/App'; 7 | import CssBaseline from '@material-ui/core/CssBaseline'; 8 | 9 | ReactDOM.render( 10 | 11 | 12 | 13 | , 14 | document.getElementById('app') 15 | ); 16 | 17 | module.hot.accept(); 18 | -------------------------------------------------------------------------------- /express-bcrypt/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bcrypt-thing", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "nodemon index.js" 8 | }, 9 | "keywords": [], 10 | "author": "Vuka", 11 | "license": "ISC", 12 | "dependencies": { 13 | "bcryptjs": "^2.4.3", 14 | "body-parser": "^1.19.0", 15 | "express": "^4.17.1", 16 | "knex": "^0.20.15", 17 | "nodemon": "^2.0.3", 18 | "sqlite3": "^4.1.1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /express-google-oauth2/done/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "exp-oauth2", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "author": "vuka", 10 | "license": "MIT", 11 | "dependencies": { 12 | "cookie-session": "^1.4.0", 13 | "cors": "^2.8.5", 14 | "dotenv": "^10.0.0", 15 | "express": "^4.17.1", 16 | "passport": "^0.4.1", 17 | "passport-google-oauth20": "^2.0.0" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /express-file-upload/done/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express-file-upload", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index" 8 | }, 9 | "author": "Vuka", 10 | "license": "ISC", 11 | "dependencies": { 12 | "body-parser": "^1.19.0", 13 | "express": "^4.17.1", 14 | "express-fileupload": "^1.1.7-alpha.3", 15 | "file-type": "^15.0.1", 16 | "knex": "^0.21.1", 17 | "sqlite3": "^4.2.0" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /express-email/base/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const bodyParser = require('body-parser') 3 | 4 | const app = express() 5 | const port = 3000 6 | 7 | // parse application/x-www-form-urlencoded 8 | app.use(bodyParser.urlencoded({ extended: false })) 9 | 10 | // parse application/json 11 | app.use(bodyParser.json()) 12 | 13 | 14 | app.get('/', async (req, res) => { 15 | res.send('Hello vro!') 16 | }) 17 | 18 | app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`)) -------------------------------------------------------------------------------- /express-google-oauth2/base/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const app = express() 3 | const cors = require('cors') 4 | const bodyParser = require('body-parser') 5 | 6 | app.use(cors()) 7 | 8 | // parse application/x-www-form-urlencoded 9 | app.use(bodyParser.urlencoded({ extended: false })) 10 | 11 | // parse application/json 12 | app.use(bodyParser.json()) 13 | 14 | app.get('/', (req, res) => res.send('Hello World!')) 15 | 16 | app.listen(3000, () => console.log(`Example app listening on port ${3000}!`)) -------------------------------------------------------------------------------- /simple-press-detect/src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | import { ReportHandler } from 'web-vitals'; 2 | 3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => { 4 | if (onPerfEntry && onPerfEntry instanceof Function) { 5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 6 | getCLS(onPerfEntry); 7 | getFID(onPerfEntry); 8 | getFCP(onPerfEntry); 9 | getLCP(onPerfEntry); 10 | getTTFB(onPerfEntry); 11 | }); 12 | } 13 | }; 14 | 15 | export default reportWebVitals; 16 | -------------------------------------------------------------------------------- /express-jwt-auth/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jwt-auth", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "nodemon index.js" 8 | }, 9 | "keywords": [], 10 | "author": "Vuka", 11 | "license": "ISC", 12 | "dependencies": { 13 | "bcryptjs": "^2.4.3", 14 | "body-parser": "^1.19.0", 15 | "express": "^4.17.1", 16 | "jsonwebtoken": "^8.5.1", 17 | "knex": "^0.20.15", 18 | "nodemon": "^2.0.3", 19 | "sqlite3": "^4.2.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /flask-google-oauth2/auth_decorator.py: -------------------------------------------------------------------------------- 1 | from flask import session 2 | from functools import wraps 3 | 4 | 5 | def login_required(f): 6 | @wraps(f) 7 | def decorated_function(*args, **kwargs): 8 | user = dict(session).get('profile', None) 9 | # You would add a check here and usethe user id or something to fetch 10 | # the other data for that user/check if they exist 11 | if user: 12 | return f(*args, **kwargs) 13 | return 'You aint logged in, no page for u!' 14 | return decorated_function 15 | -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/react-app/src/components/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // Components 3 | import HomePage from './HomePage'; 4 | // Stripe 5 | import {Elements} from '@stripe/react-stripe-js'; 6 | import {loadStripe} from '@stripe/stripe-js'; 7 | // Styles 8 | import '../index.scss'; 9 | 10 | const stripePromise = loadStripe('pk_test_O.....'); 11 | 12 | function App() { 13 | return ( 14 | 15 | 16 | 17 | ); 18 | } 19 | 20 | export default App; 21 | -------------------------------------------------------------------------------- /react-express-stripe/webhooks/react-app/src/components/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // Components 3 | import HomePage from './HomePage'; 4 | // Stripe 5 | import {Elements} from '@stripe/react-stripe-js'; 6 | import {loadStripe} from '@stripe/stripe-js'; 7 | // Styles 8 | import '../index.scss'; 9 | 10 | const stripePromise = loadStripe(process.env.STRIPE_PUB_KEY); 11 | 12 | function App() { 13 | return ( 14 | 15 | 16 | 17 | ); 18 | } 19 | 20 | export default App; 21 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/react-app/src/components/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // Components 3 | import HomePage from './HomePage'; 4 | // Stripe 5 | import {Elements} from '@stripe/react-stripe-js'; 6 | import {loadStripe} from '@stripe/stripe-js'; 7 | // Styles 8 | import '../index.scss'; 9 | 10 | const stripePromise = loadStripe(process.env.STRIPE_PUB_KEY); 11 | 12 | function App() { 13 | return ( 14 | 15 | 16 | 17 | ); 18 | } 19 | 20 | export default App; 21 | -------------------------------------------------------------------------------- /express-google-oauth2/done/README.md: -------------------------------------------------------------------------------- 1 | # Login with google through passport js 2 | 3 | ### Clone repository 4 | git clone https://github.com/Vuka951/tutorial-code 5 | 6 | ### move to the folder /express-google-oauth2/done 7 | cd ./express-google-oauth2/done 8 | 9 | ### install dependencies 10 | npm install 11 | 12 | ### config your environments variables 13 | create a .env file 14 | - EXPRESS_PORT= 15 | - GOOGLE_CLIENT_ID= 16 | - GOOGLE_CLIENT_SECRET= 17 | - GOOGLE_CALLBACK= 18 | 19 | ## run :-) 20 | npm run start 21 | 22 | ## test 23 | http://localhost:3000/google -------------------------------------------------------------------------------- /react-redux/base/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Minimal React Boilerplate For Redux 10 | 11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /react-redux/done/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Minimal React Boilerplate For Redux 10 | 11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/react-app/src/components/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // Components 3 | import HomePage from './HomePage'; 4 | // Styles 5 | import '../index.scss'; 6 | // Stripe Imports 7 | import {Elements} from '@stripe/react-stripe-js'; 8 | import {loadStripe} from '@stripe/stripe-js'; 9 | 10 | // the key is located in the .env file 11 | const stripePromise = loadStripe(process.env.PUB_KEY); 12 | 13 | function App() { 14 | return ( 15 | 16 | 17 | 18 | ); 19 | } 20 | 21 | export default App; 22 | -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/react-app/src/components/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // Components 3 | import HomePage from './HomePage'; 4 | // Styles 5 | import '../index.scss'; 6 | // Stripe Imports 7 | import {Elements} from '@stripe/react-stripe-js'; 8 | import {loadStripe} from '@stripe/stripe-js'; 9 | 10 | // the key is located in the .env file 11 | const stripePromise = loadStripe(process.env.PUB_KEY); 12 | 13 | function App() { 14 | return ( 15 | 16 | 17 | 18 | ); 19 | } 20 | 21 | export default App; 22 | -------------------------------------------------------------------------------- /react-express-stripe/base/react-app/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Minimal React Boilerplate For Stripe 10 | 11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /react-flask-stripe/base/react-app/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Minimal React Boilerplate For Stripe 10 | 11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /react-express-stripe/webhooks/react-app/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Minimal React Boilerplate For Stripe 10 | 11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/react-app/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Minimal React Boilerplate For Stripe 10 | 11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/react-app/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Minimal React Boilerplate For Stripe 10 | 11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/react-app/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Minimal React Boilerplate For Stripe 10 | 11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/react-app/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Minimal React Boilerplate For Stripe 10 | 11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /simple-press-detect/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react-ultimate-click-outside/src/useClickOutside.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from "react"; 2 | 3 | export function useClickOutside( 4 | ref: React.RefObject, 5 | callback: () => void 6 | ) { 7 | useEffect(() => { 8 | const handleClickOutside = (event: MouseEvent) => { 9 | if (ref.current && !ref.current.contains(event.target as Node)) { 10 | callback(); 11 | } 12 | }; 13 | 14 | document.addEventListener("mousedown", handleClickOutside); 15 | return () => { 16 | document.removeEventListener("mousedown", handleClickOutside); 17 | }; 18 | }, [ref, callback]); 19 | } 20 | -------------------------------------------------------------------------------- /simple-press-detect/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | const root = ReactDOM.createRoot( 8 | document.getElementById('root') as HTMLElement 9 | ); 10 | root.render( 11 | 12 | 13 | 14 | ); 15 | 16 | // If you want to start measuring performance in your app, pass a function 17 | // to log results (for example: reportWebVitals(console.log)) 18 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 19 | reportWebVitals(); 20 | -------------------------------------------------------------------------------- /py-websockets/app.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import websockets 3 | 4 | connected = set() 5 | 6 | async def server(websocket, path): 7 | # Register. 8 | connected.add(websocket) 9 | try: 10 | async for message in websocket: 11 | for conn in connected: 12 | if conn != websocket: 13 | await conn.send(f'Got a new MSG FOR YOU: {message}') 14 | finally: 15 | # Unregister. 16 | connected.remove(websocket) 17 | 18 | 19 | start_server = websockets.serve(server, "localhost", 5000) 20 | 21 | asyncio.get_event_loop().run_until_complete(start_server) 22 | asyncio.get_event_loop().run_forever() 23 | -------------------------------------------------------------------------------- /simple-press-detect/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "esModuleInterop": true, 12 | "allowSyntheticDefaultImports": true, 13 | "strict": true, 14 | "forceConsistentCasingInFileNames": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "module": "esnext", 17 | "moduleResolution": "node", 18 | "resolveJsonModule": true, 19 | "isolatedModules": true, 20 | "noEmit": true, 21 | "jsx": "react-jsx" 22 | }, 23 | "include": [ 24 | "src" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /express-file-upload/base/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const bodyParser = require('body-parser') 3 | 4 | const app = express() 5 | const port = 3000 6 | 7 | // parse application/x-www-form-urlencoded 8 | app.use(bodyParser.urlencoded({ extended: false })) 9 | 10 | // parse application/json 11 | app.use(bodyParser.json()) 12 | 13 | // DB 14 | const knex = require('knex')({ 15 | client: 'sqlite3', 16 | connection: { 17 | filename: "./img.db" 18 | }, 19 | useNullAsDefault: true 20 | }); 21 | 22 | app.get('/', async (req, res) => { 23 | res.send('Hello vro!') 24 | }) 25 | 26 | app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`)) 27 | -------------------------------------------------------------------------------- /react-express-stripe/webhooks/react-app/src/components/CardInput.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {CardElement} from '@stripe/react-stripe-js'; 3 | 4 | const CARD_ELEMENT_OPTIONS = { 5 | style: { 6 | base: { 7 | 'color': '#32325d', 8 | 'fontFamily': '"Helvetica Neue", Helvetica, sans-serif', 9 | 'fontSmoothing': 'antialiased', 10 | 'fontSize': '16px', 11 | '::placeholder': { 12 | color: '#aab7c4', 13 | }, 14 | }, 15 | invalid: { 16 | color: '#fa755a', 17 | iconColor: '#fa755a', 18 | }, 19 | }, 20 | }; 21 | 22 | export default function CardInput() { 23 | return ( 24 | 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/react-app/src/components/CardInput.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {CardElement} from '@stripe/react-stripe-js'; 3 | 4 | const CARD_ELEMENT_OPTIONS = { 5 | style: { 6 | base: { 7 | 'color': '#32325d', 8 | 'fontFamily': '"Helvetica Neue", Helvetica, sans-serif', 9 | 'fontSmoothing': 'antialiased', 10 | 'fontSize': '16px', 11 | '::placeholder': { 12 | color: '#aab7c4', 13 | }, 14 | }, 15 | invalid: { 16 | color: '#fa755a', 17 | iconColor: '#fa755a', 18 | }, 19 | }, 20 | }; 21 | 22 | export default function CardInput() { 23 | return ( 24 | 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/react-app/src/components/CardInput.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {CardElement} from '@stripe/react-stripe-js'; 3 | 4 | const CARD_ELEMENT_OPTIONS = { 5 | style: { 6 | base: { 7 | 'color': '#32325d', 8 | 'fontFamily': '"Helvetica Neue", Helvetica, sans-serif', 9 | 'fontSmoothing': 'antialiased', 10 | 'fontSize': '16px', 11 | '::placeholder': { 12 | color: '#aab7c4', 13 | }, 14 | }, 15 | invalid: { 16 | color: '#fa755a', 17 | iconColor: '#fa755a', 18 | }, 19 | }, 20 | }; 21 | 22 | export default function CardInput() { 23 | return ( 24 | 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /react-ultimate-click-outside/src/useClickOutsideMultiple.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from "react"; 2 | 3 | export function useClickOutside( 4 | refs: React.RefObject[], 5 | callback: () => void 6 | ) { 7 | useEffect(() => { 8 | const handleClickOutside = (event: MouseEvent) => { 9 | if ( 10 | !refs.some( 11 | (ref) => ref.current && ref.current.contains(event.target as Node) 12 | ) 13 | ) { 14 | callback(); 15 | } 16 | }; 17 | 18 | document.addEventListener("mousedown", handleClickOutside); 19 | return () => { 20 | document.removeEventListener("mousedown", handleClickOutside); 21 | }; 22 | }, [refs, callback]); 23 | } 24 | -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/react-app/src/components/CardInput.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // stripe 3 | import {CardElement} from '@stripe/react-stripe-js'; 4 | 5 | const CARD_ELEMENT_OPTIONS = { 6 | style: { 7 | base: { 8 | 'color': '#32325d', 9 | 'fontFamily': '"Helvetica Neue", Helvetica, sans-serif', 10 | 'fontSmoothing': 'antialiased', 11 | 'fontSize': '16px', 12 | '::placeholder': { 13 | color: '#aab7c4', 14 | }, 15 | }, 16 | invalid: { 17 | color: '#fa755a', 18 | iconColor: '#fa755a', 19 | }, 20 | }, 21 | }; 22 | 23 | export default function CardInput() { 24 | return ( 25 | 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /react-ultimate-click-outside/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 4 | "target": "ES2022", 5 | "lib": ["ES2023"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "isolatedModules": true, 13 | "moduleDetection": "force", 14 | "noEmit": true, 15 | 16 | /* Linting */ 17 | "strict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "noFallthroughCasesInSwitch": true, 21 | "noUncheckedSideEffectImports": true 22 | }, 23 | "include": ["vite.config.ts"] 24 | } 25 | -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/react-app/src/components/CardInput.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // stripe 3 | import {CardElement} from '@stripe/react-stripe-js'; 4 | 5 | const CARD_ELEMENT_OPTIONS = { 6 | style: { 7 | base: { 8 | 'color': '#32325d', 9 | 'fontFamily': '"Helvetica Neue", Helvetica, sans-serif', 10 | 'fontSmoothing': 'antialiased', 11 | 'fontSize': '16px', 12 | '::placeholder': { 13 | color: '#aab7c4', 14 | }, 15 | }, 16 | invalid: { 17 | color: '#fa755a', 18 | iconColor: '#fa755a', 19 | }, 20 | }, 21 | }; 22 | 23 | export default function CardInput() { 24 | return ( 25 | 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /simple-press-detect/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /react-redux/base/src/components/HomePage.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // UI Components 3 | import Grid from '@material-ui/core/Grid'; 4 | import Button from '@material-ui/core/Button'; 5 | 6 | 7 | function HomePage(props) { 8 | return ( 9 | <> 10 | 20 | 21 | 22 | 23 | 24 | 25 | ); 26 | } 27 | 28 | export default HomePage; 29 | -------------------------------------------------------------------------------- /react-ultimate-click-outside/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", 4 | "target": "ES2020", 5 | "useDefineForClassFields": true, 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "module": "ESNext", 8 | "skipLibCheck": true, 9 | 10 | /* Bundler mode */ 11 | "moduleResolution": "bundler", 12 | "allowImportingTsExtensions": true, 13 | "isolatedModules": true, 14 | "moduleDetection": "force", 15 | "noEmit": true, 16 | "jsx": "react-jsx", 17 | 18 | /* Linting */ 19 | "strict": true, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "noFallthroughCasesInSwitch": true, 23 | "noUncheckedSideEffectImports": true 24 | }, 25 | "include": ["src"] 26 | } 27 | -------------------------------------------------------------------------------- /flask-bcrypt/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Python: Flask", 9 | "type": "python", 10 | "request": "launch", 11 | "module": "flask", 12 | "env": { 13 | "FLASK_APP": "main.py", 14 | "FLASK_ENV": "development", 15 | "FLASK_DEBUG": "0" 16 | }, 17 | "args": [ 18 | "run", 19 | "--no-debugger", 20 | "--no-reload" 21 | ], 22 | "jinja": true 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /flask-jwt-auth/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Python: Flask", 9 | "type": "python", 10 | "request": "launch", 11 | "module": "flask", 12 | "env": { 13 | "FLASK_APP": "main.py", 14 | "FLASK_ENV": "development", 15 | "FLASK_DEBUG": "0" 16 | }, 17 | "args": [ 18 | "run", 19 | "--no-debugger", 20 | "--no-reload" 21 | ], 22 | "jinja": true 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /js-express-websockets/done/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const app = express() 3 | const server = require('http').createServer(app); 4 | const WebSocket = require('ws'); 5 | 6 | const wss = new WebSocket.Server({ server:server }); 7 | 8 | wss.on('connection', function connection(ws) { 9 | console.log('A new client Connected!'); 10 | ws.send('Welcome New Client!'); 11 | 12 | ws.on('message', function incoming(message) { 13 | console.log('received: %s', message); 14 | 15 | wss.clients.forEach(function each(client) { 16 | if (client !== ws && client.readyState === WebSocket.OPEN) { 17 | client.send(message); 18 | } 19 | }); 20 | 21 | }); 22 | }); 23 | 24 | app.get('/', (req, res) => res.send('Hello World!')) 25 | 26 | server.listen(3000, () => console.log(`Lisening on port :3000`)) 27 | -------------------------------------------------------------------------------- /react-ultimate-click-outside/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-ultimate-click-outside", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc -b && vite build", 9 | "lint": "eslint .", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "react": "^19.0.0", 14 | "react-dom": "^19.0.0" 15 | }, 16 | "devDependencies": { 17 | "@eslint/js": "^9.21.0", 18 | "@types/react": "^19.0.10", 19 | "@types/react-dom": "^19.0.4", 20 | "@vitejs/plugin-react": "^4.3.4", 21 | "eslint": "^9.21.0", 22 | "eslint-plugin-react-hooks": "^5.1.0", 23 | "eslint-plugin-react-refresh": "^0.4.19", 24 | "globals": "^15.15.0", 25 | "typescript": "~5.7.2", 26 | "typescript-eslint": "^8.24.1", 27 | "vite": "^6.2.0" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /react-ultimate-click-outside/eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import reactHooks from 'eslint-plugin-react-hooks' 4 | import reactRefresh from 'eslint-plugin-react-refresh' 5 | import tseslint from 'typescript-eslint' 6 | 7 | export default tseslint.config( 8 | { ignores: ['dist'] }, 9 | { 10 | extends: [js.configs.recommended, ...tseslint.configs.recommended], 11 | files: ['**/*.{ts,tsx}'], 12 | languageOptions: { 13 | ecmaVersion: 2020, 14 | globals: globals.browser, 15 | }, 16 | plugins: { 17 | 'react-hooks': reactHooks, 18 | 'react-refresh': reactRefresh, 19 | }, 20 | rules: { 21 | ...reactHooks.configs.recommended.rules, 22 | 'react-refresh/only-export-components': [ 23 | 'warn', 24 | { allowConstantExport: true }, 25 | ], 26 | }, 27 | }, 28 | ) 29 | -------------------------------------------------------------------------------- /js-express-websockets/done/clients/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Socket Thing1 7 | 8 | 9 | Client1 10 | 11 | 12 | 30 | -------------------------------------------------------------------------------- /js-express-websockets/done/clients/index2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Socket Thing2 7 | 8 | 9 | Client2 10 | 11 | 12 | 30 | -------------------------------------------------------------------------------- /flask-email/done/app.py: -------------------------------------------------------------------------------- 1 | # Import smtplib for the actual sending function 2 | import smtplib 3 | 4 | # Import the email modules we'll need 5 | from email.message import EmailMessage 6 | 7 | from flask import Flask, request 8 | 9 | app = Flask(__name__) 10 | 11 | 12 | @app.route('/') 13 | def hello_world(): 14 | return 'Hello, World!' 15 | 16 | 17 | @app.route('/email', methods=['POST']) 18 | def send_email(): 19 | email = request.json.get('email', None) 20 | # SMTP stuff 21 | s = smtplib.SMTP(host='smtp.ethereal.email', port=587) 22 | s.starttls() 23 | s.login('antonetta96@ethereal.email', '6uXDBvv5HTxjQ7e256') 24 | 25 | msg = EmailMessage() 26 | msg.set_content('Long time no see my friend!') 27 | 28 | # me == the sender's email address 29 | # you == the recipient's email address 30 | msg['Subject'] = ' A hello from a far' 31 | msg['From'] = 'Jimmy ' 32 | msg['To'] = f'{email}' 33 | 34 | s.send_message(msg) 35 | s.quit() 36 | return 'Email sent!' 37 | -------------------------------------------------------------------------------- /react-express-stripe/webhooks/react-app/src/index.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Shows how you can use CSS to style your Element's container. 3 | * These classes are added to your Stripe Element by default. 4 | * You can override these classNames by using the options passed 5 | * to the CardElement component. 6 | * https://stripe.com/docs/js/elements_object/create_element?type=card#elements_create-options-classes 7 | */ 8 | 9 | .StripeElement { 10 | height: 40px; 11 | padding: 10px 12px; 12 | width: 100%; 13 | color: #32325d; 14 | background-color: white; 15 | border: 1px solid transparent; 16 | border-radius: 4px; 17 | 18 | box-shadow: 0 1px 3px 0 #e6ebf1; 19 | -webkit-transition: box-shadow 150ms ease; 20 | transition: box-shadow 150ms ease; 21 | } 22 | 23 | .StripeElement--focus { 24 | box-shadow: 0 1px 3px 0 #cfd7df; 25 | } 26 | 27 | .StripeElement--invalid { 28 | border-color: #fa755a; 29 | } 30 | 31 | .StripeElement--webkit-autofill { 32 | background-color: #fefde5 !important; 33 | } -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/react-app/src/index.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Shows how you can use CSS to style your Element's container. 3 | * These classes are added to your Stripe Element by default. 4 | * You can override these classNames by using the options passed 5 | * to the CardElement component. 6 | * https://stripe.com/docs/js/elements_object/create_element?type=card#elements_create-options-classes 7 | */ 8 | 9 | .StripeElement { 10 | height: 40px; 11 | padding: 10px 12px; 12 | width: 100%; 13 | color: #32325d; 14 | background-color: white; 15 | border: 1px solid transparent; 16 | border-radius: 4px; 17 | 18 | box-shadow: 0 1px 3px 0 #e6ebf1; 19 | -webkit-transition: box-shadow 150ms ease; 20 | transition: box-shadow 150ms ease; 21 | } 22 | 23 | .StripeElement--focus { 24 | box-shadow: 0 1px 3px 0 #cfd7df; 25 | } 26 | 27 | .StripeElement--invalid { 28 | border-color: #fa755a; 29 | } 30 | 31 | .StripeElement--webkit-autofill { 32 | background-color: #fefde5 !important; 33 | } -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/react-app/src/index.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Shows how you can use CSS to style your Element's container. 3 | * These classes are added to your Stripe Element by default. 4 | * You can override these classNames by using the options passed 5 | * to the CardElement component. 6 | * https://stripe.com/docs/js/elements_object/create_element?type=card#elements_create-options-classes 7 | */ 8 | 9 | .StripeElement { 10 | height: 40px; 11 | padding: 10px 12px; 12 | width: 100%; 13 | color: #32325d; 14 | background-color: white; 15 | border: 1px solid transparent; 16 | border-radius: 4px; 17 | 18 | box-shadow: 0 1px 3px 0 #e6ebf1; 19 | -webkit-transition: box-shadow 150ms ease; 20 | transition: box-shadow 150ms ease; 21 | } 22 | 23 | .StripeElement--focus { 24 | box-shadow: 0 1px 3px 0 #cfd7df; 25 | } 26 | 27 | .StripeElement--invalid { 28 | border-color: #fa755a; 29 | } 30 | 31 | .StripeElement--webkit-autofill { 32 | background-color: #fefde5 !important; 33 | } -------------------------------------------------------------------------------- /react-express-stripe/subscription/react-app/src/index.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Shows how you can use CSS to style your Element's container. 3 | * These classes are added to your Stripe Element by default. 4 | * You can override these classNames by using the options passed 5 | * to the CardElement component. 6 | * https://stripe.com/docs/js/elements_object/create_element?type=card#elements_create-options-classes 7 | */ 8 | 9 | .StripeElement { 10 | height: 40px; 11 | padding: 10px 12px; 12 | width: 100%; 13 | color: #32325d; 14 | background-color: white; 15 | border: 1px solid transparent; 16 | border-radius: 4px; 17 | 18 | box-shadow: 0 1px 3px 0 #e6ebf1; 19 | -webkit-transition: box-shadow 150ms ease; 20 | transition: box-shadow 150ms ease; 21 | } 22 | 23 | .StripeElement--focus { 24 | box-shadow: 0 1px 3px 0 #cfd7df; 25 | } 26 | 27 | .StripeElement--invalid { 28 | border-color: #fa755a; 29 | } 30 | 31 | .StripeElement--webkit-autofill { 32 | background-color: #fefde5 !important; 33 | } -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/react-app/src/index.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Shows how you can use CSS to style your Element's container. 3 | * These classes are added to your Stripe Element by default. 4 | * You can override these classNames by using the options passed 5 | * to the CardElement component. 6 | * https://stripe.com/docs/js/elements_object/create_element?type=card#elements_create-options-classes 7 | */ 8 | 9 | .StripeElement { 10 | height: 40px; 11 | padding: 10px 12px; 12 | width: 100%; 13 | color: #32325d; 14 | background-color: white; 15 | border: 1px solid transparent; 16 | border-radius: 4px; 17 | 18 | box-shadow: 0 1px 3px 0 #e6ebf1; 19 | -webkit-transition: box-shadow 150ms ease; 20 | transition: box-shadow 150ms ease; 21 | } 22 | 23 | .StripeElement--focus { 24 | box-shadow: 0 1px 3px 0 #cfd7df; 25 | } 26 | 27 | .StripeElement--invalid { 28 | border-color: #fa755a; 29 | } 30 | 31 | .StripeElement--webkit-autofill { 32 | background-color: #fefde5 !important; 33 | } -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/express-api/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const app = express() 3 | const cors = require('cors') 4 | const bodyParser = require('body-parser') 5 | const stripe = require('stripe')('sk_test_a........'); 6 | 7 | const port = 3000 8 | 9 | // parse application/x-www-form-urlencoded 10 | app.use(bodyParser.urlencoded({ extended: false })) 11 | 12 | // parse application/json 13 | app.use(bodyParser.json()) 14 | 15 | app.use(cors()) 16 | 17 | app.post('/pay', async (req, res) => { 18 | const {email} = req.body; 19 | 20 | const paymentIntent = await stripe.paymentIntents.create({ 21 | amount: 5000, 22 | currency: 'usd', 23 | // Verify your integration in this guide by including this parameter 24 | metadata: {integration_check: 'accept_a_payment'}, 25 | receipt_email: email, 26 | }); 27 | 28 | res.json({'client_secret': paymentIntent['client_secret']}) 29 | }) 30 | 31 | app.listen(port, () => console.log(`Example app listening on port ${port}!`)) -------------------------------------------------------------------------------- /py-websockets/clients/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Socket Thing1 7 | 8 | 9 | Client1 10 | 11 | 12 | 35 | -------------------------------------------------------------------------------- /py-websockets/clients/index2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Socket Thing2 7 | 8 | 9 | Client2 10 | 11 | 12 | 35 | -------------------------------------------------------------------------------- /react-redux/done/debug.log: -------------------------------------------------------------------------------- 1 | [0429/181507.448:ERROR:crash_report_database_win.cc(469)] failed to stat report 2 | [0429/181507.449:ERROR:crash_report_database_win.cc(469)] failed to stat report 3 | [0429/181507.449:ERROR:crash_report_database_win.cc(469)] failed to stat report 4 | [0429/181507.449:ERROR:crash_report_database_win.cc(469)] failed to stat report 5 | [0429/181507.449:ERROR:crash_report_database_win.cc(469)] failed to stat report 6 | [0429/181507.449:ERROR:crash_report_database_win.cc(469)] failed to stat report 7 | [0429/181507.449:ERROR:crash_report_database_win.cc(469)] failed to stat report 8 | [0429/181507.449:ERROR:crash_report_database_win.cc(469)] failed to stat report 9 | [0429/181507.449:ERROR:crash_report_database_win.cc(469)] failed to stat report 10 | [0429/181507.449:ERROR:crash_report_database_win.cc(469)] failed to stat report 11 | [0429/181507.450:ERROR:crash_report_database_win.cc(469)] failed to stat report 12 | [0429/181507.450:ERROR:crash_report_database_win.cc(469)] failed to stat report 13 | [0429/181507.450:ERROR:crash_report_database_win.cc(469)] failed to stat report 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Vuka951 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /react-redux/base/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Vukasin Stojanovic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /react-redux/done/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Vukasin Stojanovic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /simple-press-detect/src/App.tsx: -------------------------------------------------------------------------------- 1 | import React, {useState, useEffect} from 'react' 2 | 3 | const useKeyPress = (targetKey: string) => { 4 | const [keyPressed, setKeyPressed] = useState(false) 5 | 6 | const downHandler = ({ key }: KeyboardEvent) => { 7 | if (key === targetKey) setKeyPressed(true) 8 | } 9 | 10 | const upHandler = ({ key }: KeyboardEvent) => { 11 | if (key === targetKey) setKeyPressed(false) 12 | } 13 | 14 | useEffect(() => { 15 | window.addEventListener('keydown', downHandler) 16 | window.addEventListener('keyup', upHandler) 17 | 18 | return () => { 19 | window.removeEventListener('keydown', downHandler) 20 | window.removeEventListener('keyup', upHandler) 21 | } 22 | }) 23 | 24 | return keyPressed 25 | } 26 | 27 | export default function App() { 28 | const pressed = useKeyPress('a') 29 | 30 | return ( 31 |
32 | {pressed ? ( 33 | bulb-on 34 | ) : ( 35 | bulb-off 36 | )} 37 |
38 | ) 39 | } 40 | -------------------------------------------------------------------------------- /react-flask-stripe/base/react-app/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Vukasin Stojanovic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /react-express-stripe/base/react-app/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Vukasin Stojanovic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /react-express-stripe/webhooks/react-app/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Vukasin Stojanovic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /simple-press-detect/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simple-press-detect", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.17.0", 7 | "@testing-library/react": "^13.4.0", 8 | "@testing-library/user-event": "^13.5.0", 9 | "@types/jest": "^27.5.2", 10 | "@types/node": "^16.18.66", 11 | "@types/react": "^18.2.39", 12 | "@types/react-dom": "^18.2.17", 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0", 15 | "react-scripts": "5.0.1", 16 | "typescript": "^4.9.5", 17 | "web-vitals": "^2.1.4" 18 | }, 19 | "scripts": { 20 | "start": "react-scripts start", 21 | "build": "react-scripts build", 22 | "test": "react-scripts test", 23 | "eject": "react-scripts eject" 24 | }, 25 | "eslintConfig": { 26 | "extends": [ 27 | "react-app", 28 | "react-app/jest" 29 | ] 30 | }, 31 | "browserslist": { 32 | "production": [ 33 | ">0.2%", 34 | "not dead", 35 | "not op_mini all" 36 | ], 37 | "development": [ 38 | "last 1 chrome version", 39 | "last 1 firefox version", 40 | "last 1 safari version" 41 | ] 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/react-app/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Vukasin Stojanovic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/react-app/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Vukasin Stojanovic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/react-app/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Vukasin Stojanovic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/react-app/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Vukasin Stojanovic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /express-jwt-auth/helpers/auth.js: -------------------------------------------------------------------------------- 1 | const jwt = require('jsonwebtoken'); 2 | 3 | const auth = (req, res, next) => { 4 | try { 5 | const token = req.headers.authorization.split(' '); 6 | const user = jwt.verify(token[1], 'superScretthing'); 7 | if (token[0] === 'Bearer' && user) { 8 | // Also it is common that if the user is verified, you put the decoded data from the token into req.user to be used later in the code if needed 9 | // Example: 10 | // req.user = user; 11 | next() 12 | } 13 | } catch (e) { 14 | // console.log(e) // Uncomment if needed for debug 15 | // If the error thrown is related to JWT 16 | if (e.name === 'JsonWebTokenError') { 17 | res.status(401).json(e.message); 18 | // if the authorization header isn't provided 19 | } else if(e.name === 'TypeError' && e.message === `Cannot read property 'split' of undefined`) { 20 | res.status(400).json(`Please Provide an Authorization Header that contains a token. Example: 'Bearer example_token'`); 21 | } else { 22 | res.status(400).json('Something Broke!'); 23 | } 24 | } 25 | } 26 | 27 | module.exports = auth; -------------------------------------------------------------------------------- /react-ultimate-click-outside/src/Simple.tsx: -------------------------------------------------------------------------------- 1 | import { useState, useRef } from "react"; 2 | import { useClickOutside } from "./useClickOutside"; 3 | 4 | export default function Simple() { 5 | const [isDropdownOpen, setDropdownOpen] = useState(false); 6 | const dropdownRef = useRef(null); 7 | 8 | useClickOutside(dropdownRef, () => { 9 | if (isDropdownOpen) { 10 | setDropdownOpen(false); 11 | } 12 | }); 13 | 14 | return ( 15 |
25 |
26 | 29 | {isDropdownOpen && ( 30 |
39 | THIS IS A DROPDWONAAAA 40 |
41 | )} 42 |
43 |
44 | ); 45 | } 46 | -------------------------------------------------------------------------------- /flask-file-upload/done/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, request, Response 2 | from werkzeug.utils import secure_filename 3 | 4 | from db import db_init, db 5 | from models import Img 6 | 7 | app = Flask(__name__) 8 | # SQLAlchemy config. Read more: https://flask-sqlalchemy.palletsprojects.com/en/2.x/ 9 | app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///img.db' 10 | app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False 11 | db_init(app) 12 | 13 | 14 | @app.route('/') 15 | def hello_world(): 16 | return 'Hello, World!' 17 | 18 | 19 | @app.route('/upload', methods=['POST']) 20 | def upload(): 21 | pic = request.files['pic'] 22 | if not pic: 23 | return 'No pic uploaded!', 400 24 | 25 | filename = secure_filename(pic.filename) 26 | mimetype = pic.mimetype 27 | if not filename or not mimetype: 28 | return 'Bad upload!', 400 29 | 30 | img = Img(img=pic.read(), name=filename, mimetype=mimetype) 31 | db.session.add(img) 32 | db.session.commit() 33 | 34 | return 'Img Uploaded!', 200 35 | 36 | 37 | @app.route('/') 38 | def get_img(id): 39 | img = Img.query.filter_by(id=id).first() 40 | if not img: 41 | return 'Img Not Found!', 404 42 | 43 | return Response(img.img, mimetype=img.mimetype) 44 | -------------------------------------------------------------------------------- /py-discord-bot/app.py: -------------------------------------------------------------------------------- 1 | import discord 2 | from youtube_search import YoutubeSearch 3 | 4 | from disc_conf import TOKEN, PREFIX 5 | 6 | client = discord.Client() 7 | 8 | # event gets fired when the bot is ready 9 | @client.event 10 | async def on_ready(): 11 | print(f'We have logged in as {client.user}') 12 | 13 | 14 | # gets fired on each msg 15 | @client.event 16 | async def on_message(message): 17 | # if the msg was sent by a bot ignore 18 | if message.author.bot: 19 | return 20 | 21 | # if the msg doesnt start with our defined command prefix ignore it 22 | if not message.content.startswith(PREFIX): 23 | return 24 | 25 | # Seperate the command and the args 26 | command = message.content[1:].split(' ')[0] 27 | args = message.content[1:].split(' ')[1:] 28 | 29 | if command == 'search': 30 | what_to_search = ' '.join(args) 31 | results = YoutubeSearch(what_to_search, max_results=10).to_dict() 32 | link = f'https://www.youtube.com{results[0]["link"]}' 33 | first_result = {'title': results[0]['title'], 'link': link} 34 | # sends the msg back ot the channel with the result 35 | await message.channel.send(f'The First YT Search Result For `{what_to_search}` is: `{first_result["title"]}` and it can be found at {first_result["link"]}') 36 | 37 | client.run(TOKEN) 38 | -------------------------------------------------------------------------------- /react-ultimate-click-outside/src/Multiple.tsx: -------------------------------------------------------------------------------- 1 | import { useState, useRef } from "react"; 2 | import { useClickOutside } from "./useClickOutsideMultiple"; 3 | 4 | export default function Multiple() { 5 | const [isDropdownOpen, setDropdownOpen] = useState(false); 6 | const dropdownRef = useRef(null); 7 | const otherRef = useRef(null); 8 | 9 | useClickOutside([dropdownRef, otherRef], () => { 10 | if (isDropdownOpen) { 11 | setDropdownOpen(false); 12 | } 13 | }); 14 | 15 | return ( 16 |
26 |
27 |
CLICK ME TOO
28 | 31 | {isDropdownOpen && ( 32 |
41 | THIS IS A DROPDWONAAAA 42 |
43 | )} 44 |
45 |
46 | ); 47 | } 48 | -------------------------------------------------------------------------------- /react-redux/base/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "sourceType": "module" 4 | }, 5 | "env": { 6 | "browser": true, 7 | "jquery": true, 8 | "es6": true, 9 | "node": true 10 | }, 11 | "globals": { 12 | "joint": true, 13 | "_": true, 14 | "g": true, 15 | "app": true, 16 | "V": true, 17 | "Pace": true 18 | }, 19 | "parser": "babel-eslint", 20 | "extends": [ 21 | "eslint:recommended", 22 | "plugin:react/recommended", 23 | "google" 24 | ], 25 | "rules": { 26 | "react/jsx-filename-extension": 0, 27 | "react/jsx-uses-vars": [ 28 | 2 29 | ], 30 | "import/no-extraneous-dependencies": 0, 31 | "max-len": 0, 32 | "require-jsdoc": 0, 33 | "valid-jsdoc": 0, 34 | "no-multi-str": 0, 35 | "react/no-find-dom-node": 0, 36 | "no-console": 0, 37 | "indent": [ 38 | "error", 39 | 2 40 | ], 41 | "linebreak-style": 0 42 | }, 43 | "settings": { 44 | "react": { 45 | "createClass": "createReactClass", 46 | "pragma": "React", 47 | "version": "detect" 48 | }, 49 | "propWrapperFunctions": [ 50 | "forbidExtraProps", 51 | {"property": "freeze", "object": "Object"}, 52 | {"property": "myFavoriteWrapper"} 53 | ] 54 | } 55 | } -------------------------------------------------------------------------------- /react-redux/done/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "sourceType": "module" 4 | }, 5 | "env": { 6 | "browser": true, 7 | "jquery": true, 8 | "es6": true, 9 | "node": true 10 | }, 11 | "globals": { 12 | "joint": true, 13 | "_": true, 14 | "g": true, 15 | "app": true, 16 | "V": true, 17 | "Pace": true 18 | }, 19 | "parser": "babel-eslint", 20 | "extends": [ 21 | "eslint:recommended", 22 | "plugin:react/recommended", 23 | "google" 24 | ], 25 | "rules": { 26 | "react/jsx-filename-extension": 0, 27 | "react/jsx-uses-vars": [ 28 | 2 29 | ], 30 | "import/no-extraneous-dependencies": 0, 31 | "max-len": 0, 32 | "require-jsdoc": 0, 33 | "valid-jsdoc": 0, 34 | "no-multi-str": 0, 35 | "react/no-find-dom-node": 0, 36 | "no-console": 0, 37 | "indent": [ 38 | "error", 39 | 2 40 | ], 41 | "linebreak-style": 0 42 | }, 43 | "settings": { 44 | "react": { 45 | "createClass": "createReactClass", 46 | "pragma": "React", 47 | "version": "detect" 48 | }, 49 | "propWrapperFunctions": [ 50 | "forbidExtraProps", 51 | {"property": "freeze", "object": "Object"}, 52 | {"property": "myFavoriteWrapper"} 53 | ] 54 | } 55 | } -------------------------------------------------------------------------------- /react-flask-stripe/base/react-app/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "sourceType": "module" 4 | }, 5 | "env": { 6 | "browser": true, 7 | "jquery": true, 8 | "es6": true, 9 | "node": true 10 | }, 11 | "globals": { 12 | "joint": true, 13 | "_": true, 14 | "g": true, 15 | "app": true, 16 | "V": true, 17 | "Pace": true 18 | }, 19 | "parser": "babel-eslint", 20 | "extends": [ 21 | "eslint:recommended", 22 | "plugin:react/recommended", 23 | "google" 24 | ], 25 | "rules": { 26 | "react/jsx-filename-extension": 0, 27 | "react/jsx-uses-vars": [ 28 | 2 29 | ], 30 | "import/no-extraneous-dependencies": 0, 31 | "max-len": 0, 32 | "require-jsdoc": 0, 33 | "valid-jsdoc": 0, 34 | "no-multi-str": 0, 35 | "react/no-find-dom-node": 0, 36 | "no-console": 0, 37 | "indent": [ 38 | "error", 39 | 2 40 | ], 41 | "linebreak-style": 0 42 | }, 43 | "settings": { 44 | "react": { 45 | "createClass": "createReactClass", 46 | "pragma": "React", 47 | "version": "detect" 48 | }, 49 | "propWrapperFunctions": [ 50 | "forbidExtraProps", 51 | {"property": "freeze", "object": "Object"}, 52 | {"property": "myFavoriteWrapper"} 53 | ] 54 | } 55 | } -------------------------------------------------------------------------------- /react-express-stripe/base/react-app/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "sourceType": "module" 4 | }, 5 | "env": { 6 | "browser": true, 7 | "jquery": true, 8 | "es6": true, 9 | "node": true 10 | }, 11 | "globals": { 12 | "joint": true, 13 | "_": true, 14 | "g": true, 15 | "app": true, 16 | "V": true, 17 | "Pace": true 18 | }, 19 | "parser": "babel-eslint", 20 | "extends": [ 21 | "eslint:recommended", 22 | "plugin:react/recommended", 23 | "google" 24 | ], 25 | "rules": { 26 | "react/jsx-filename-extension": 0, 27 | "react/jsx-uses-vars": [ 28 | 2 29 | ], 30 | "import/no-extraneous-dependencies": 0, 31 | "max-len": 0, 32 | "require-jsdoc": 0, 33 | "valid-jsdoc": 0, 34 | "no-multi-str": 0, 35 | "react/no-find-dom-node": 0, 36 | "no-console": 0, 37 | "indent": [ 38 | "error", 39 | 2 40 | ], 41 | "linebreak-style": 0 42 | }, 43 | "settings": { 44 | "react": { 45 | "createClass": "createReactClass", 46 | "pragma": "React", 47 | "version": "detect" 48 | }, 49 | "propWrapperFunctions": [ 50 | "forbidExtraProps", 51 | {"property": "freeze", "object": "Object"}, 52 | {"property": "myFavoriteWrapper"} 53 | ] 54 | } 55 | } -------------------------------------------------------------------------------- /express-google-oauth2/done/passport-setup.js: -------------------------------------------------------------------------------- 1 | const passport = require('passport'); 2 | const GoogleStrategy = require('passport-google-oauth20').Strategy; 3 | require('dotenv').config() 4 | 5 | passport.serializeUser(function(user, done) { 6 | /* 7 | From the user take just the id (to minimize the cookie size) and just pass the id of the user 8 | to the done callback 9 | PS: You dont have to do it like this its just usually done like this 10 | */ 11 | done(null, user); 12 | }); 13 | 14 | passport.deserializeUser(function(user, done) { 15 | /* 16 | Instead of user this function usually recives the id 17 | then you use the id to select the user from the db and pass the user obj to the done callback 18 | PS: You can later access this data in any routes in: req.user 19 | */ 20 | done(null, user); 21 | }); 22 | 23 | passport.use(new GoogleStrategy({ 24 | clientID: process.env.GOOGLE_CLIENT_ID, 25 | clientSecret: process.env.GOOGLE_CLIENT_SECRET, 26 | callbackURL: process.env.GOOGLE_CALLBACK 27 | }, 28 | function(accessToken, refreshToken, profile, done) { 29 | /* 30 | use the profile info (mainly profile id) to check if the user is registerd in ur db 31 | If yes select the user and pass him to the done callback 32 | If not create the user and then select him and pass to callback 33 | */ 34 | return done(null, profile); 35 | } 36 | )); 37 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/react-app/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "sourceType": "module" 4 | }, 5 | "env": { 6 | "browser": true, 7 | "jquery": true, 8 | "es6": true, 9 | "node": true 10 | }, 11 | "globals": { 12 | "joint": true, 13 | "_": true, 14 | "g": true, 15 | "app": true, 16 | "V": true, 17 | "Pace": true 18 | }, 19 | "parser": "babel-eslint", 20 | "extends": [ 21 | "eslint:recommended", 22 | "plugin:react/recommended", 23 | "google" 24 | ], 25 | "rules": { 26 | "react/jsx-filename-extension": 0, 27 | "react/jsx-uses-vars": [ 28 | 2 29 | ], 30 | "import/no-extraneous-dependencies": 0, 31 | "max-len": 0, 32 | "require-jsdoc": 0, 33 | "valid-jsdoc": 0, 34 | "no-multi-str": 0, 35 | "react/no-find-dom-node": 0, 36 | "no-console": 0, 37 | "indent": [ 38 | "error", 39 | 2 40 | ], 41 | "linebreak-style": 0 42 | }, 43 | "settings": { 44 | "react": { 45 | "createClass": "createReactClass", 46 | "pragma": "React", 47 | "version": "detect" 48 | }, 49 | "propWrapperFunctions": [ 50 | "forbidExtraProps", 51 | {"property": "freeze", "object": "Object"}, 52 | {"property": "myFavoriteWrapper"} 53 | ] 54 | } 55 | } -------------------------------------------------------------------------------- /react-express-stripe/webhooks/react-app/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "sourceType": "module" 4 | }, 5 | "env": { 6 | "browser": true, 7 | "jquery": true, 8 | "es6": true, 9 | "node": true 10 | }, 11 | "globals": { 12 | "joint": true, 13 | "_": true, 14 | "g": true, 15 | "app": true, 16 | "V": true, 17 | "Pace": true 18 | }, 19 | "parser": "babel-eslint", 20 | "extends": [ 21 | "eslint:recommended", 22 | "plugin:react/recommended", 23 | "google" 24 | ], 25 | "rules": { 26 | "react/jsx-filename-extension": 0, 27 | "react/jsx-uses-vars": [ 28 | 2 29 | ], 30 | "import/no-extraneous-dependencies": 0, 31 | "max-len": 0, 32 | "require-jsdoc": 0, 33 | "valid-jsdoc": 0, 34 | "no-multi-str": 0, 35 | "react/no-find-dom-node": 0, 36 | "no-console": 0, 37 | "indent": [ 38 | "error", 39 | 2 40 | ], 41 | "linebreak-style": 0 42 | }, 43 | "settings": { 44 | "react": { 45 | "createClass": "createReactClass", 46 | "pragma": "React", 47 | "version": "detect" 48 | }, 49 | "propWrapperFunctions": [ 50 | "forbidExtraProps", 51 | {"property": "freeze", "object": "Object"}, 52 | {"property": "myFavoriteWrapper"} 53 | ] 54 | } 55 | } -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/react-app/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "sourceType": "module" 4 | }, 5 | "env": { 6 | "browser": true, 7 | "jquery": true, 8 | "es6": true, 9 | "node": true 10 | }, 11 | "globals": { 12 | "joint": true, 13 | "_": true, 14 | "g": true, 15 | "app": true, 16 | "V": true, 17 | "Pace": true 18 | }, 19 | "parser": "babel-eslint", 20 | "extends": [ 21 | "eslint:recommended", 22 | "plugin:react/recommended", 23 | "google" 24 | ], 25 | "rules": { 26 | "react/jsx-filename-extension": 0, 27 | "react/jsx-uses-vars": [ 28 | 2 29 | ], 30 | "import/no-extraneous-dependencies": 0, 31 | "max-len": 0, 32 | "require-jsdoc": 0, 33 | "valid-jsdoc": 0, 34 | "no-multi-str": 0, 35 | "react/no-find-dom-node": 0, 36 | "no-console": 0, 37 | "indent": [ 38 | "error", 39 | 2 40 | ], 41 | "linebreak-style": 0 42 | }, 43 | "settings": { 44 | "react": { 45 | "createClass": "createReactClass", 46 | "pragma": "React", 47 | "version": "detect" 48 | }, 49 | "propWrapperFunctions": [ 50 | "forbidExtraProps", 51 | {"property": "freeze", "object": "Object"}, 52 | {"property": "myFavoriteWrapper"} 53 | ] 54 | } 55 | } -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/react-app/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "sourceType": "module" 4 | }, 5 | "env": { 6 | "browser": true, 7 | "jquery": true, 8 | "es6": true, 9 | "node": true 10 | }, 11 | "globals": { 12 | "joint": true, 13 | "_": true, 14 | "g": true, 15 | "app": true, 16 | "V": true, 17 | "Pace": true 18 | }, 19 | "parser": "babel-eslint", 20 | "extends": [ 21 | "eslint:recommended", 22 | "plugin:react/recommended", 23 | "google" 24 | ], 25 | "rules": { 26 | "react/jsx-filename-extension": 0, 27 | "react/jsx-uses-vars": [ 28 | 2 29 | ], 30 | "import/no-extraneous-dependencies": 0, 31 | "max-len": 0, 32 | "require-jsdoc": 0, 33 | "valid-jsdoc": 0, 34 | "no-multi-str": 0, 35 | "react/no-find-dom-node": 0, 36 | "no-console": 0, 37 | "indent": [ 38 | "error", 39 | 2 40 | ], 41 | "linebreak-style": 0 42 | }, 43 | "settings": { 44 | "react": { 45 | "createClass": "createReactClass", 46 | "pragma": "React", 47 | "version": "detect" 48 | }, 49 | "propWrapperFunctions": [ 50 | "forbidExtraProps", 51 | {"property": "freeze", "object": "Object"}, 52 | {"property": "myFavoriteWrapper"} 53 | ] 54 | } 55 | } -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/react-app/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "sourceType": "module" 4 | }, 5 | "env": { 6 | "browser": true, 7 | "jquery": true, 8 | "es6": true, 9 | "node": true 10 | }, 11 | "globals": { 12 | "joint": true, 13 | "_": true, 14 | "g": true, 15 | "app": true, 16 | "V": true, 17 | "Pace": true 18 | }, 19 | "parser": "babel-eslint", 20 | "extends": [ 21 | "eslint:recommended", 22 | "plugin:react/recommended", 23 | "google" 24 | ], 25 | "rules": { 26 | "react/jsx-filename-extension": 0, 27 | "react/jsx-uses-vars": [ 28 | 2 29 | ], 30 | "import/no-extraneous-dependencies": 0, 31 | "max-len": 0, 32 | "require-jsdoc": 0, 33 | "valid-jsdoc": 0, 34 | "no-multi-str": 0, 35 | "react/no-find-dom-node": 0, 36 | "no-console": 0, 37 | "indent": [ 38 | "error", 39 | 2 40 | ], 41 | "linebreak-style": 0 42 | }, 43 | "settings": { 44 | "react": { 45 | "createClass": "createReactClass", 46 | "pragma": "React", 47 | "version": "detect" 48 | }, 49 | "propWrapperFunctions": [ 50 | "forbidExtraProps", 51 | {"property": "freeze", "object": "Object"}, 52 | {"property": "myFavoriteWrapper"} 53 | ] 54 | } 55 | } -------------------------------------------------------------------------------- /js-discord-bot/index.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const client = new Discord.Client(); 3 | const ytsr = require('ytsr'); 4 | 5 | // Config imports 6 | const { 7 | token, 8 | prefix, 9 | } = require('./config.json'); 10 | 11 | // Gets triggered when the client becomes ready to start working 12 | client.on('ready', () => { 13 | console.log(`Logged in as ${client.user.tag}!`); 14 | }); 15 | 16 | 17 | // Gets triggered whenever a message is sent/created on any text channel taht the bot is in 18 | client.on('message', async (msg) => { 19 | 20 | // Checks if the msg is sent by a bot 21 | if(msg.author.bot) return; 22 | 23 | // Checks if the msg starts with the predefined prefix 24 | if(!msg.content.startsWith(prefix)) return; 25 | 26 | /* 27 | Removes the first char(prefix "!" in this case) and then split the rest of the msg into: 28 | the command and the rest 29 | */ 30 | const [command, ...args] = msg.content.substring(1).split(' '); 31 | 32 | // Checks if the command is search 33 | if(command === 'search') { 34 | // joins the array of args into a single string 35 | const whatToSearch = args.join(' '); 36 | // Makes an api call to yt and searches for w/e and returns the first 5 results 37 | const results = await ytsr(whatToSearch, {limit: 5}); 38 | const firstResult = {title: results.items[0].title, link: results.items[0].link}; 39 | // Replys to in the channel the msg was sent with the info 40 | msg.reply(`The First YT Search Result for ${whatToSearch} is: ${firstResult.title} and it can be found at ${firstResult.link}`); 41 | } 42 | }); 43 | 44 | client.login(token); -------------------------------------------------------------------------------- /express-file-upload/done/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const bodyParser = require('body-parser') 3 | const fileUpload = require('express-fileupload'); 4 | const FileType = require('file-type'); 5 | 6 | const app = express() 7 | const port = 3000 8 | 9 | // parse application/x-www-form-urlencoded 10 | app.use(bodyParser.urlencoded({ extended: false })) 11 | 12 | // parse application/json 13 | app.use(bodyParser.json()) 14 | 15 | app.use(fileUpload()); 16 | 17 | // DB 18 | const knex = require('knex')({ 19 | client: 'sqlite3', 20 | connection: { 21 | filename: "./img.db" 22 | }, 23 | useNullAsDefault: true 24 | }); 25 | 26 | app.get('/', async (req, res) => { 27 | res.send('Hello vro!') 28 | }) 29 | 30 | app.post('/upload', async (req, res) => { 31 | const {name, data} = req.files.pic; 32 | if (name && data) { 33 | await knex.insert({name: name, img: data}).into('img'); 34 | res.sendStatus(200); 35 | } else { 36 | res.sendStatus(400); 37 | } 38 | }) 39 | 40 | app.get('/img/:id', async (req, res) => { 41 | const id = req.params.id; 42 | const img = await knex('img').where({id: id}).first(); 43 | if (img) { 44 | const contentType = await FileType.fromBuffer(img.img); // get the mimetype of the buffer (in this case its gonna be jpg but can be png or w/e) 45 | res.type(contentType.mime); // not always needed most modern browsers including chrome will understand it is an img without this 46 | res.end(img.img); 47 | } else { 48 | res.end('No Img with that Id!'); 49 | } 50 | }) 51 | 52 | app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`)) 53 | -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/flask-api/main.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, request 2 | from flask_cors import CORS 3 | import stripe 4 | 5 | stripe.api_key = 'sk_test_....' 6 | 7 | endpoint_secret = 'whsec_...' 8 | 9 | app = Flask(__name__) 10 | CORS(app) 11 | 12 | user_info = {} 13 | 14 | @app.route('/pay', methods=['POST']) 15 | def pay(): 16 | email = request.json.get('email', None) 17 | 18 | if not email: 19 | return 'You need to send an Email!', 400 20 | 21 | intent = stripe.PaymentIntent.create( 22 | amount=50000, 23 | currency='usd', 24 | receipt_email=email 25 | ) 26 | 27 | return {"client_secret": intent['client_secret']}, 200 28 | 29 | @app.route('/webhook', methods=['POST']) 30 | def webhook(): 31 | payload = request.get_data() 32 | sig_header = request.headers.get('Stripe_Signature', None) 33 | 34 | if not sig_header: 35 | return 'No Signature Header!', 400 36 | 37 | try: 38 | event = stripe.Webhook.construct_event( 39 | payload, sig_header, endpoint_secret 40 | ) 41 | except ValueError as e: 42 | # Invalid payload 43 | return 'Invalid payload', 400 44 | except stripe.error.SignatureVerificationError as e: 45 | # Invalid signature 46 | return 'Invalid signature', 400 47 | 48 | if event['type'] == 'payment_intent.succeeded': 49 | email = event['data']['object']['receipt_email'] # contains the email that will recive the recipt for the payment (users email usually) 50 | 51 | user_info['paid_50'] = True 52 | user_info['email'] = email 53 | else: 54 | return 'Unexpected event type', 400 55 | 56 | return '', 200 57 | 58 | @app.route('/user', methods=['GET']) 59 | def user(): 60 | return user_info, 200 61 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/express-api/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const app = express() 3 | const cors = require('cors') 4 | const bodyParser = require('body-parser') 5 | const stripe = require('stripe')('sk_test_a.................'); 6 | 7 | const port = 3000 8 | 9 | // parse application/x-www-form-urlencoded 10 | app.use(bodyParser.urlencoded({ extended: false })) 11 | 12 | // parse application/json 13 | app.use(bodyParser.json()) 14 | 15 | app.use(cors()) 16 | 17 | app.post('/pay', async (req, res) => { 18 | const {email} = req.body; 19 | 20 | const paymentIntent = await stripe.paymentIntents.create({ 21 | amount: 5000, 22 | currency: 'usd', 23 | // Verify your integration in this guide by including this parameter 24 | metadata: {integration_check: 'accept_a_payment'}, 25 | receipt_email: email, 26 | }); 27 | 28 | res.json({'client_secret': paymentIntent['client_secret']}) 29 | }) 30 | 31 | app.post('/sub', async (req, res) => { 32 | const {email, payment_method} = req.body; 33 | 34 | const customer = await stripe.customers.create({ 35 | payment_method: payment_method, 36 | email: email, 37 | invoice_settings: { 38 | default_payment_method: payment_method, 39 | }, 40 | }); 41 | 42 | const subscription = await stripe.subscriptions.create({ 43 | customer: customer.id, 44 | items: [{ plan: 'plan_G......' }], 45 | expand: ['latest_invoice.payment_intent'] 46 | }); 47 | 48 | const status = subscription['latest_invoice']['payment_intent']['status'] 49 | const client_secret = subscription['latest_invoice']['payment_intent']['client_secret'] 50 | 51 | res.json({'client_secret': client_secret, 'status': status}); 52 | }) 53 | 54 | app.listen(port, () => console.log(`Example app listening on port ${port}!`)) -------------------------------------------------------------------------------- /react-redux/base/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "minimal-react-boilerplate-for-redux", 3 | "version": "1.0.0", 4 | "description": "Minimal React Boilerplate For redux", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "webpack-dev-server --config ./webpack.config.js --mode development --open", 8 | "build": "webpack --mode production", 9 | "lint": "eslint src" 10 | }, 11 | "keywords": [], 12 | "author": "Vuka", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "@babel/core": "^7.9.0", 16 | "@babel/plugin-transform-runtime": "^7.9.0", 17 | "@babel/preset-env": "^7.9.5", 18 | "@babel/preset-react": "^7.9.4", 19 | "@babel/runtime": "^7.9.2", 20 | "autoprefixer": "^9.7.6", 21 | "babel-eslint": "^10.1.0", 22 | "babel-loader": "^8.1.0", 23 | "clean-webpack-plugin": "^3.0.0", 24 | "css-loader": "^3.5.3", 25 | "eslint": "^6.8.0", 26 | "eslint-config-google": "^0.14.0", 27 | "eslint-loader": "^3.0.4", 28 | "eslint-plugin-import": "^2.20.2", 29 | "eslint-plugin-jsx-a11y": "^6.2.3", 30 | "eslint-plugin-react": "^7.19.0", 31 | "file-loader": "^5.1.0", 32 | "html-webpack-plugin": "^3.2.0", 33 | "mini-css-extract-plugin": "^0.8.2", 34 | "node-sass": "^4.14.0", 35 | "optimize-css-assets-webpack-plugin": "^5.0.3", 36 | "postcss-loader": "^3.0.0", 37 | "react-hot-loader": "^4.12.20", 38 | "sass-loader": "^8.0.2", 39 | "style-loader": "^1.2.1", 40 | "terser-webpack-plugin": "^2.3.6", 41 | "webpack": "^4.43.0", 42 | "webpack-cli": "^3.3.11", 43 | "webpack-dev-server": "^3.10.3" 44 | }, 45 | "dependencies": { 46 | "@material-ui/core": "^4.9.12", 47 | "@material-ui/icons": "^4.9.1", 48 | "axios": "^0.19.2", 49 | "dotenv-webpack": "^1.7.0", 50 | "react": "^16.13.1", 51 | "react-dom": "^16.13.1" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /express-email/done/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const bodyParser = require('body-parser') 3 | 4 | const nodemailer = require("nodemailer"); 5 | 6 | const app = express() 7 | const port = 3000 8 | 9 | // parse application/x-www-form-urlencoded 10 | app.use(bodyParser.urlencoded({ extended: false })) 11 | 12 | // parse application/json 13 | app.use(bodyParser.json()) 14 | 15 | 16 | app.get('/', (req, res) => { 17 | res.send('Hello vro!') 18 | }) 19 | 20 | app.post('/', async (req, res) => { 21 | const {email} = req.body; 22 | // create reusable transporter object using the default SMTP transport 23 | let transporter = nodemailer.createTransport({ 24 | host: "smtp.ethereal.email", 25 | port: 587, 26 | secure: false, // true for 465, false for other ports 27 | auth: { 28 | user: 'da...@ethereal.email', // ethereal user 29 | pass: 'aJ...', // ethereal password 30 | }, 31 | }); 32 | 33 | const msg = { 34 | from: '"The Exapress App" ', // sender address 35 | to: `${email}`, // list of receivers 36 | subject: "Sup", // Subject line 37 | text: "Long time no see", // plain text body 38 | } 39 | // send mail with defined transport object 40 | const info = await transporter.sendMail(msg); 41 | 42 | console.log("Message sent: %s", info.messageId); 43 | // Message sent: 44 | 45 | // Preview only available when sending through an Ethereal account 46 | console.log("Preview URL: %s", nodemailer.getTestMessageUrl(info)); 47 | // Preview URL: https://ethereal.email/message/WaQKMgKddxQDoou... 48 | 49 | res.send('Email Sent!') 50 | }) 51 | 52 | app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`)) 53 | -------------------------------------------------------------------------------- /express-google-oauth2/done/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const app = express() 3 | const cors = require('cors') 4 | const passport = require('passport'); 5 | const cookieSession = require('cookie-session') 6 | require('dotenv').config() 7 | require('./passport-setup'); 8 | 9 | app.use(cors()) 10 | 11 | // parse application/json 12 | app.use(express.json()) 13 | 14 | // For an actual app you should configure this with an experation time, better keys, proxy and secure 15 | app.use(cookieSession({ 16 | name: 'tuto-session', 17 | keys: ['key1', 'key2'] 18 | })) 19 | 20 | // Auth middleware that checks if the user is logged in 21 | const isLoggedIn = (req, res, next) => { 22 | if (req.user) { 23 | next(); 24 | } else { 25 | res.sendStatus(401); 26 | } 27 | } 28 | 29 | // Initializes passport and passport sessions 30 | app.use(passport.initialize()); 31 | app.use(passport.session()); 32 | 33 | // Example protected and unprotected routes 34 | app.get('/', (req, res) => res.send('Example Home page!')) 35 | app.get('/failed', (req, res) => res.send('You Failed to log in!')) 36 | 37 | // In this route you can see that if the user is logged in u can acess his info in: req.user 38 | app.get('/good', isLoggedIn, (req, res) => res.send(`Welcome mr ${req.user.displayName}!`)) 39 | 40 | // Auth Routes 41 | app.get('/google', passport.authenticate('google', { scope: ['profile', 'email'] })); 42 | 43 | app.get('/google/callback', passport.authenticate('google', { failureRedirect: '/failed' }), 44 | function(req, res) { 45 | // Successful authentication, redirect home. 46 | res.redirect('/good'); 47 | } 48 | ); 49 | 50 | app.get('/logout', (req, res) => { 51 | req.session = null; 52 | req.logout(); 53 | res.redirect('/'); 54 | }) 55 | 56 | app.listen(process.env.EXPRESS_PORT, () => console.log(`Example app listening on port ${process.env.EXPRESS_PORT}!`)) -------------------------------------------------------------------------------- /react-flask-stripe/base/react-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "minimal-react-boilerplate-for-stripe", 3 | "version": "1.0.0", 4 | "description": "Minimal React Boilerplate For Stripe", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "webpack-dev-server --config ./webpack.config.js --mode development --open", 8 | "build": "webpack --mode production", 9 | "lint": "eslint src" 10 | }, 11 | "keywords": [], 12 | "author": "Vuka", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "@babel/core": "^7.8.4", 16 | "@babel/plugin-transform-runtime": "^7.8.3", 17 | "@babel/preset-env": "^7.8.4", 18 | "@babel/preset-react": "^7.8.3", 19 | "@babel/runtime": "^7.8.4", 20 | "autoprefixer": "^9.7.4", 21 | "babel-eslint": "^10.0.3", 22 | "babel-loader": "^8.0.6", 23 | "clean-webpack-plugin": "^3.0.0", 24 | "css-loader": "^3.4.2", 25 | "eslint": "^6.8.0", 26 | "eslint-config-google": "^0.14.0", 27 | "eslint-loader": "^3.0.3", 28 | "eslint-plugin-import": "^2.20.1", 29 | "eslint-plugin-jsx-a11y": "^6.2.3", 30 | "eslint-plugin-react": "^7.18.3", 31 | "file-loader": "^5.1.0", 32 | "html-webpack-plugin": "^3.2.0", 33 | "mini-css-extract-plugin": "^0.8.2", 34 | "node-sass": "^4.13.1", 35 | "optimize-css-assets-webpack-plugin": "^5.0.3", 36 | "postcss-loader": "^3.0.0", 37 | "react-hot-loader": "^4.12.19", 38 | "redux-devtools-extension": "^2.13.8", 39 | "sass-loader": "^8.0.2", 40 | "style-loader": "^1.1.3", 41 | "terser-webpack-plugin": "^2.3.5", 42 | "webpack": "^4.41.6", 43 | "webpack-cli": "^3.3.11", 44 | "webpack-dev-server": "^3.10.3" 45 | }, 46 | "dependencies": { 47 | "@material-ui/core": "^4.9.3", 48 | "@material-ui/icons": "^4.9.1", 49 | "axios": "^0.19.2", 50 | "dotenv-webpack": "^1.7.0", 51 | "react": "^16.12.0", 52 | "react-dom": "^16.12.0" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /simple-press-detect/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /react-express-stripe/base/react-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "minimal-react-boilerplate-for-stripe", 3 | "version": "1.0.0", 4 | "description": "Minimal React Boilerplate For Stripe", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "webpack-dev-server --config ./webpack.config.js --mode development --open", 8 | "build": "webpack --mode production", 9 | "lint": "eslint src" 10 | }, 11 | "keywords": [], 12 | "author": "Vuka", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "@babel/core": "^7.8.4", 16 | "@babel/plugin-transform-runtime": "^7.8.3", 17 | "@babel/preset-env": "^7.8.4", 18 | "@babel/preset-react": "^7.8.3", 19 | "@babel/runtime": "^7.8.4", 20 | "autoprefixer": "^9.7.4", 21 | "babel-eslint": "^10.0.3", 22 | "babel-loader": "^8.0.6", 23 | "clean-webpack-plugin": "^3.0.0", 24 | "css-loader": "^3.4.2", 25 | "eslint": "^6.8.0", 26 | "eslint-config-google": "^0.14.0", 27 | "eslint-loader": "^3.0.3", 28 | "eslint-plugin-import": "^2.20.1", 29 | "eslint-plugin-jsx-a11y": "^6.2.3", 30 | "eslint-plugin-react": "^7.18.3", 31 | "file-loader": "^5.1.0", 32 | "html-webpack-plugin": "^3.2.0", 33 | "mini-css-extract-plugin": "^0.8.2", 34 | "node-sass": "^4.13.1", 35 | "optimize-css-assets-webpack-plugin": "^5.0.3", 36 | "postcss-loader": "^3.0.0", 37 | "react-hot-loader": "^4.12.19", 38 | "redux-devtools-extension": "^2.13.8", 39 | "sass-loader": "^8.0.2", 40 | "style-loader": "^1.1.3", 41 | "terser-webpack-plugin": "^2.3.5", 42 | "webpack": "^4.41.6", 43 | "webpack-cli": "^3.3.11", 44 | "webpack-dev-server": "^3.10.3" 45 | }, 46 | "dependencies": { 47 | "@material-ui/core": "^4.9.3", 48 | "@material-ui/icons": "^4.9.1", 49 | "axios": "^0.19.2", 50 | "dotenv-webpack": "^1.7.0", 51 | "react": "^16.12.0", 52 | "react-dom": "^16.12.0" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /react-flask-stripe/base/react-app/src/components/HomePage.js: -------------------------------------------------------------------------------- 1 | import React, {useState} from 'react'; 2 | // MUI Components 3 | import Button from '@material-ui/core/Button'; 4 | import Card from '@material-ui/core/Card'; 5 | import CardContent from '@material-ui/core/CardContent'; 6 | import TextField from '@material-ui/core/TextField'; 7 | // Util imports 8 | import {makeStyles} from '@material-ui/core/styles'; 9 | 10 | const useStyles = makeStyles({ 11 | root: { 12 | maxWidth: 500, 13 | margin: '35vh auto', 14 | }, 15 | content: { 16 | display: 'flex', 17 | flexDirection: 'column', 18 | alignContent: 'flex-start', 19 | }, 20 | div: { 21 | display: 'flex', 22 | flexDirection: 'row', 23 | alignContent: 'flex-start', 24 | justifyContent: 'space-between', 25 | }, 26 | button: { 27 | margin: '2em auto 1em', 28 | }, 29 | }); 30 | 31 | function HomePage() { 32 | const classes = useStyles(); 33 | // State 34 | const [email, setEmail] = useState(''); 35 | 36 | 37 | return ( 38 | 39 | 40 | setEmail(e.target.value)} 50 | fullWidth 51 | /> 52 |
53 | 56 | 59 |
60 |
61 |
62 | ); 63 | } 64 | 65 | export default HomePage; 66 | -------------------------------------------------------------------------------- /react-express-stripe/base/react-app/src/components/HomePage.js: -------------------------------------------------------------------------------- 1 | import React, {useState} from 'react'; 2 | // MUI Components 3 | import Button from '@material-ui/core/Button'; 4 | import Card from '@material-ui/core/Card'; 5 | import CardContent from '@material-ui/core/CardContent'; 6 | import TextField from '@material-ui/core/TextField'; 7 | // Util imports 8 | import {makeStyles} from '@material-ui/core/styles'; 9 | 10 | const useStyles = makeStyles({ 11 | root: { 12 | maxWidth: 500, 13 | margin: '35vh auto', 14 | }, 15 | content: { 16 | display: 'flex', 17 | flexDirection: 'column', 18 | alignContent: 'flex-start', 19 | }, 20 | div: { 21 | display: 'flex', 22 | flexDirection: 'row', 23 | alignContent: 'flex-start', 24 | justifyContent: 'space-between', 25 | }, 26 | button: { 27 | margin: '2em auto 1em', 28 | }, 29 | }); 30 | 31 | function HomePage() { 32 | const classes = useStyles(); 33 | // State 34 | const [email, setEmail] = useState(''); 35 | 36 | 37 | return ( 38 | 39 | 40 | setEmail(e.target.value)} 50 | fullWidth 51 | /> 52 |
53 | 56 | 59 |
60 |
61 |
62 | ); 63 | } 64 | 65 | export default HomePage; 66 | -------------------------------------------------------------------------------- /react-redux/done/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "minimal-react-boilerplate-for-redux", 3 | "version": "1.0.0", 4 | "description": "Minimal React Boilerplate For redux", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "webpack-dev-server --config ./webpack.config.js --mode development --open", 8 | "build": "webpack --mode production", 9 | "lint": "eslint src" 10 | }, 11 | "keywords": [], 12 | "author": "Vuka", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "@babel/core": "^7.9.0", 16 | "@babel/plugin-transform-runtime": "^7.9.0", 17 | "@babel/preset-env": "^7.9.5", 18 | "@babel/preset-react": "^7.9.4", 19 | "@babel/runtime": "^7.9.2", 20 | "autoprefixer": "^9.7.6", 21 | "babel-eslint": "^10.1.0", 22 | "babel-loader": "^8.1.0", 23 | "clean-webpack-plugin": "^3.0.0", 24 | "css-loader": "^3.5.3", 25 | "eslint": "^6.8.0", 26 | "eslint-config-google": "^0.14.0", 27 | "eslint-loader": "^3.0.4", 28 | "eslint-plugin-import": "^2.20.2", 29 | "eslint-plugin-jsx-a11y": "^6.2.3", 30 | "eslint-plugin-react": "^7.19.0", 31 | "file-loader": "^5.1.0", 32 | "html-webpack-plugin": "^3.2.0", 33 | "mini-css-extract-plugin": "^0.8.2", 34 | "node-sass": "^4.14.0", 35 | "optimize-css-assets-webpack-plugin": "^5.0.3", 36 | "postcss-loader": "^3.0.0", 37 | "react-hot-loader": "^4.12.20", 38 | "sass-loader": "^8.0.2", 39 | "style-loader": "^1.2.1", 40 | "terser-webpack-plugin": "^2.3.6", 41 | "webpack": "^4.43.0", 42 | "webpack-cli": "^3.3.11", 43 | "webpack-dev-server": "^3.10.3" 44 | }, 45 | "dependencies": { 46 | "@material-ui/core": "^4.9.12", 47 | "@material-ui/icons": "^4.9.1", 48 | "axios": "^0.19.2", 49 | "dotenv-webpack": "^1.7.0", 50 | "react": "^16.13.1", 51 | "react-dom": "^16.13.1", 52 | "react-redux": "^7.2.0", 53 | "redux": "^4.0.5", 54 | "redux-devtools-extension": "^2.13.8", 55 | "redux-thunk": "^2.3.0" 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/react-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "minimal-react-boilerplate-for-stripe", 3 | "version": "1.0.0", 4 | "description": "Minimal React Boilerplate For Stripe", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "webpack-dev-server --config ./webpack.config.js --mode development --open", 8 | "build": "webpack --mode production", 9 | "lint": "eslint src" 10 | }, 11 | "keywords": [], 12 | "author": "Vuka", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "@babel/core": "^7.8.4", 16 | "@babel/plugin-transform-runtime": "^7.8.3", 17 | "@babel/preset-env": "^7.8.4", 18 | "@babel/preset-react": "^7.8.3", 19 | "@babel/runtime": "^7.8.4", 20 | "autoprefixer": "^9.7.4", 21 | "babel-eslint": "^10.0.3", 22 | "babel-loader": "^8.0.6", 23 | "clean-webpack-plugin": "^3.0.0", 24 | "css-loader": "^3.4.2", 25 | "eslint": "^6.8.0", 26 | "eslint-config-google": "^0.14.0", 27 | "eslint-loader": "^3.0.3", 28 | "eslint-plugin-import": "^2.20.1", 29 | "eslint-plugin-jsx-a11y": "^6.2.3", 30 | "eslint-plugin-react": "^7.18.3", 31 | "file-loader": "^5.1.0", 32 | "html-webpack-plugin": "^3.2.0", 33 | "mini-css-extract-plugin": "^0.8.2", 34 | "node-sass": "^4.13.1", 35 | "optimize-css-assets-webpack-plugin": "^5.0.3", 36 | "postcss-loader": "^3.0.0", 37 | "react-hot-loader": "^4.12.19", 38 | "redux-devtools-extension": "^2.13.8", 39 | "sass-loader": "^8.0.2", 40 | "style-loader": "^1.1.3", 41 | "terser-webpack-plugin": "^2.3.5", 42 | "webpack": "^4.41.6", 43 | "webpack-cli": "^3.3.11", 44 | "webpack-dev-server": "^3.10.3" 45 | }, 46 | "dependencies": { 47 | "@material-ui/core": "^4.9.3", 48 | "@material-ui/icons": "^4.9.1", 49 | "@stripe/react-stripe-js": "^1.0.3", 50 | "@stripe/stripe-js": "^1.1.0", 51 | "axios": "^0.19.2", 52 | "dotenv-webpack": "^1.7.0", 53 | "react": "^16.12.0", 54 | "react-dom": "^16.12.0" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /react-express-stripe/webhooks/react-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "minimal-react-boilerplate-for-stripe", 3 | "version": "1.0.0", 4 | "description": "Minimal React Boilerplate For Stripe", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "webpack-dev-server --config ./webpack.config.js --mode development --open", 8 | "build": "webpack --mode production", 9 | "lint": "eslint src" 10 | }, 11 | "keywords": [], 12 | "author": "Vuka", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "@babel/core": "^7.8.4", 16 | "@babel/plugin-transform-runtime": "^7.8.3", 17 | "@babel/preset-env": "^7.8.4", 18 | "@babel/preset-react": "^7.8.3", 19 | "@babel/runtime": "^7.8.4", 20 | "autoprefixer": "^9.7.4", 21 | "babel-eslint": "^10.0.3", 22 | "babel-loader": "^8.0.6", 23 | "clean-webpack-plugin": "^3.0.0", 24 | "css-loader": "^3.4.2", 25 | "eslint": "^6.8.0", 26 | "eslint-config-google": "^0.14.0", 27 | "eslint-loader": "^3.0.3", 28 | "eslint-plugin-import": "^2.20.1", 29 | "eslint-plugin-jsx-a11y": "^6.2.3", 30 | "eslint-plugin-react": "^7.18.3", 31 | "file-loader": "^5.1.0", 32 | "html-webpack-plugin": "^3.2.0", 33 | "mini-css-extract-plugin": "^0.8.2", 34 | "node-sass": "^4.13.1", 35 | "optimize-css-assets-webpack-plugin": "^5.0.3", 36 | "postcss-loader": "^3.0.0", 37 | "react-hot-loader": "^4.12.19", 38 | "redux-devtools-extension": "^2.13.8", 39 | "sass-loader": "^8.0.2", 40 | "style-loader": "^1.1.3", 41 | "terser-webpack-plugin": "^2.3.5", 42 | "webpack": "^4.41.6", 43 | "webpack-cli": "^3.3.11", 44 | "webpack-dev-server": "^3.10.3" 45 | }, 46 | "dependencies": { 47 | "@material-ui/core": "^4.9.3", 48 | "@material-ui/icons": "^4.9.1", 49 | "@stripe/react-stripe-js": "^1.0.3", 50 | "@stripe/stripe-js": "^1.1.0", 51 | "axios": "^0.19.2", 52 | "dotenv-webpack": "^1.7.0", 53 | "react": "^16.12.0", 54 | "react-dom": "^16.12.0" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /react-flask-stripe/subscriptions/react-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "minimal-react-boilerplate-for-stripe", 3 | "version": "1.0.0", 4 | "description": "Minimal React Boilerplate For Stripe", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "webpack-dev-server --config ./webpack.config.js --mode development --open", 8 | "build": "webpack --mode production", 9 | "lint": "eslint src" 10 | }, 11 | "keywords": [], 12 | "author": "Vuka", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "@babel/core": "^7.8.4", 16 | "@babel/plugin-transform-runtime": "^7.8.3", 17 | "@babel/preset-env": "^7.8.4", 18 | "@babel/preset-react": "^7.8.3", 19 | "@babel/runtime": "^7.8.4", 20 | "autoprefixer": "^9.7.4", 21 | "babel-eslint": "^10.0.3", 22 | "babel-loader": "^8.0.6", 23 | "clean-webpack-plugin": "^3.0.0", 24 | "css-loader": "^3.4.2", 25 | "eslint": "^6.8.0", 26 | "eslint-config-google": "^0.14.0", 27 | "eslint-loader": "^3.0.3", 28 | "eslint-plugin-import": "^2.20.1", 29 | "eslint-plugin-jsx-a11y": "^6.2.3", 30 | "eslint-plugin-react": "^7.18.3", 31 | "file-loader": "^5.1.0", 32 | "html-webpack-plugin": "^3.2.0", 33 | "mini-css-extract-plugin": "^0.8.2", 34 | "node-sass": "^4.13.1", 35 | "optimize-css-assets-webpack-plugin": "^5.0.3", 36 | "postcss-loader": "^3.0.0", 37 | "react-hot-loader": "^4.12.19", 38 | "redux-devtools-extension": "^2.13.8", 39 | "sass-loader": "^8.0.2", 40 | "style-loader": "^1.1.3", 41 | "terser-webpack-plugin": "^2.3.5", 42 | "webpack": "^4.41.6", 43 | "webpack-cli": "^3.3.11", 44 | "webpack-dev-server": "^3.10.3" 45 | }, 46 | "dependencies": { 47 | "@material-ui/core": "^4.9.3", 48 | "@material-ui/icons": "^4.9.1", 49 | "@stripe/react-stripe-js": "^1.0.2", 50 | "@stripe/stripe-js": "^1.0.1", 51 | "axios": "^0.19.2", 52 | "dotenv-webpack": "^1.7.0", 53 | "react": "^16.12.0", 54 | "react-dom": "^16.12.0" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/react-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "minimal-react-boilerplate-for-stripe", 3 | "version": "1.0.0", 4 | "description": "Minimal React Boilerplate For Stripe", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "webpack-dev-server --config ./webpack.config.js --mode development --open", 8 | "build": "webpack --mode production", 9 | "lint": "eslint src" 10 | }, 11 | "keywords": [], 12 | "author": "Vuka", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "@babel/core": "^7.8.4", 16 | "@babel/plugin-transform-runtime": "^7.8.3", 17 | "@babel/preset-env": "^7.8.4", 18 | "@babel/preset-react": "^7.8.3", 19 | "@babel/runtime": "^7.8.4", 20 | "autoprefixer": "^9.7.4", 21 | "babel-eslint": "^10.0.3", 22 | "babel-loader": "^8.0.6", 23 | "clean-webpack-plugin": "^3.0.0", 24 | "css-loader": "^3.4.2", 25 | "eslint": "^6.8.0", 26 | "eslint-config-google": "^0.14.0", 27 | "eslint-loader": "^3.0.3", 28 | "eslint-plugin-import": "^2.20.1", 29 | "eslint-plugin-jsx-a11y": "^6.2.3", 30 | "eslint-plugin-react": "^7.18.3", 31 | "file-loader": "^5.1.0", 32 | "html-webpack-plugin": "^3.2.0", 33 | "mini-css-extract-plugin": "^0.8.2", 34 | "node-sass": "^4.13.1", 35 | "optimize-css-assets-webpack-plugin": "^5.0.3", 36 | "postcss-loader": "^3.0.0", 37 | "react-hot-loader": "^4.12.19", 38 | "redux-devtools-extension": "^2.13.8", 39 | "sass-loader": "^8.0.2", 40 | "style-loader": "^1.1.3", 41 | "terser-webpack-plugin": "^2.3.5", 42 | "webpack": "^4.41.6", 43 | "webpack-cli": "^3.3.11", 44 | "webpack-dev-server": "^3.10.3" 45 | }, 46 | "dependencies": { 47 | "@material-ui/core": "^4.9.3", 48 | "@material-ui/icons": "^4.9.1", 49 | "@stripe/react-stripe-js": "^1.0.3", 50 | "@stripe/stripe-js": "^1.1.0", 51 | "axios": "^0.19.2", 52 | "dotenv-webpack": "^1.7.0", 53 | "react": "^16.12.0", 54 | "react-dom": "^16.12.0" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /react-flask-stripe/payment-and-hooks/react-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "minimal-react-boilerplate-for-stripe", 3 | "version": "1.0.0", 4 | "description": "Minimal React Boilerplate For Stripe", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "webpack-dev-server --config ./webpack.config.js --mode development --open", 8 | "build": "webpack --mode production", 9 | "lint": "eslint src" 10 | }, 11 | "keywords": [], 12 | "author": "Vuka", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "@babel/core": "^7.8.4", 16 | "@babel/plugin-transform-runtime": "^7.8.3", 17 | "@babel/preset-env": "^7.8.4", 18 | "@babel/preset-react": "^7.8.3", 19 | "@babel/runtime": "^7.8.4", 20 | "autoprefixer": "^9.7.4", 21 | "babel-eslint": "^10.0.3", 22 | "babel-loader": "^8.0.6", 23 | "clean-webpack-plugin": "^3.0.0", 24 | "css-loader": "^3.4.2", 25 | "eslint": "^6.8.0", 26 | "eslint-config-google": "^0.14.0", 27 | "eslint-loader": "^3.0.3", 28 | "eslint-plugin-import": "^2.20.1", 29 | "eslint-plugin-jsx-a11y": "^6.2.3", 30 | "eslint-plugin-react": "^7.18.3", 31 | "file-loader": "^5.1.0", 32 | "html-webpack-plugin": "^3.2.0", 33 | "mini-css-extract-plugin": "^0.8.2", 34 | "node-sass": "^4.13.1", 35 | "optimize-css-assets-webpack-plugin": "^5.0.3", 36 | "postcss-loader": "^3.0.0", 37 | "react-hot-loader": "^4.12.19", 38 | "redux-devtools-extension": "^2.13.8", 39 | "sass-loader": "^8.0.2", 40 | "style-loader": "^1.1.3", 41 | "terser-webpack-plugin": "^2.3.5", 42 | "webpack": "^4.41.6", 43 | "webpack-cli": "^3.3.11", 44 | "webpack-dev-server": "^3.10.3" 45 | }, 46 | "dependencies": { 47 | "@material-ui/core": "^4.9.3", 48 | "@material-ui/icons": "^4.9.1", 49 | "@stripe/react-stripe-js": "^1.0.2", 50 | "@stripe/stripe-js": "^1.0.1", 51 | "axios": "^0.19.2", 52 | "dotenv-webpack": "^1.7.0", 53 | "react": "^16.12.0", 54 | "react-dom": "^16.12.0" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /react-redux/done/src/components/HomePage.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {connect} from 'react-redux'; 3 | import PropTypes from 'prop-types'; 4 | // UI Components 5 | import Grid from '@material-ui/core/Grid'; 6 | import Button from '@material-ui/core/Button'; 7 | import Card from '@material-ui/core/Card'; 8 | import Typography from '@material-ui/core/Typography'; 9 | import CardContent from '@material-ui/core/CardContent'; 10 | // Actions 11 | import {fetchUsers} from '../actions/users'; 12 | 13 | 14 | function HomePage(props) { 15 | const {users, fetchUsers} = props; 16 | return ( 17 | <> 18 | 28 | {users.map((item) => ( 29 | 30 | 31 | 32 | Name: {item.name} 33 | 34 | 35 | email: {item.email} 36 | 37 | 38 | phone: {item.phone} 39 | 40 | 41 | 42 | ) 43 | )} 44 | 45 | 46 | 47 | 48 | 49 | ); 50 | } 51 | 52 | HomePage.propTypes = { 53 | users: PropTypes.array.isRequired, 54 | fetchUsers: PropTypes.func.isRequired, 55 | } 56 | 57 | const mapStateToProps = (state) => ({ 58 | users: state.users.listOfUsers, 59 | }); 60 | 61 | const mapDispatchToProps = { 62 | fetchUsers, 63 | }; 64 | 65 | export default connect( 66 | mapStateToProps, 67 | mapDispatchToProps 68 | )(HomePage); 69 | 70 | -------------------------------------------------------------------------------- /react-ultimate-click-outside/README.md: -------------------------------------------------------------------------------- 1 | # React + TypeScript + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | 10 | ## Expanding the ESLint configuration 11 | 12 | If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: 13 | 14 | ```js 15 | export default tseslint.config({ 16 | extends: [ 17 | // Remove ...tseslint.configs.recommended and replace with this 18 | ...tseslint.configs.recommendedTypeChecked, 19 | // Alternatively, use this for stricter rules 20 | ...tseslint.configs.strictTypeChecked, 21 | // Optionally, add this for stylistic rules 22 | ...tseslint.configs.stylisticTypeChecked, 23 | ], 24 | languageOptions: { 25 | // other options... 26 | parserOptions: { 27 | project: ['./tsconfig.node.json', './tsconfig.app.json'], 28 | tsconfigRootDir: import.meta.dirname, 29 | }, 30 | }, 31 | }) 32 | ``` 33 | 34 | You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: 35 | 36 | ```js 37 | // eslint.config.js 38 | import reactX from 'eslint-plugin-react-x' 39 | import reactDom from 'eslint-plugin-react-dom' 40 | 41 | export default tseslint.config({ 42 | plugins: { 43 | // Add the react-x and react-dom plugins 44 | 'react-x': reactX, 45 | 'react-dom': reactDom, 46 | }, 47 | rules: { 48 | // other rules... 49 | // Enable its recommended typescript rules 50 | ...reactX.configs['recommended-typescript'].rules, 51 | ...reactDom.configs.recommended.rules, 52 | }, 53 | }) 54 | ``` 55 | -------------------------------------------------------------------------------- /express-dotenv/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env.test 73 | 74 | # parcel-bundler cache (https://parceljs.org/) 75 | .cache 76 | 77 | # Next.js build output 78 | .next 79 | 80 | # Nuxt.js build / generate output 81 | .nuxt 82 | dist 83 | 84 | # Gatsby files 85 | .cache/ 86 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 87 | # https://nextjs.org/blog/next-9-1#public-directory-support 88 | # public 89 | 90 | # vuepress build output 91 | .vuepress/dist 92 | 93 | # Serverless directories 94 | .serverless/ 95 | 96 | # FuseBox cache 97 | .fusebox/ 98 | 99 | # DynamoDB Local files 100 | .dynamodb/ 101 | 102 | # TernJS port file 103 | .tern-port 104 | -------------------------------------------------------------------------------- /express-bcrypt/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /express-jwt-auth/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /js-discord-bot/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /express-email/base/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /express-email/done/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /express-file-upload/base/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /express-file-upload/done/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /express-google-oauth2/base/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /express-google-oauth2/done/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /js-express-websockets/base/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /js-express-websockets/done/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /react-express-stripe/base/express-api/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /react-express-stripe/webhooks/express-api/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /react-express-stripe/subscription/express-api/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /react-express-stripe/one-time-payment/express-api/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /flask-bcrypt/main.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, request 2 | import bcrypt 3 | # Expetions for sqlaclemy 4 | from sqlalchemy.exc import IntegrityError 5 | 6 | from models import User 7 | from db import db 8 | 9 | app = Flask(__name__) 10 | # SQLAlchemy config read more: https://flask-sqlalchemy.palletsprojects.com/en/2.x/ 11 | app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///user.db' 12 | app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False 13 | db.init_app(app) 14 | 15 | @app.route('/register', methods=['POST']) 16 | def register(): 17 | try: 18 | email = request.json.get('email', None) 19 | password = request.json.get('password', None) 20 | 21 | if not email: 22 | return 'Missing email', 400 23 | if not password: 24 | return 'Missing password', 400 25 | 26 | hashed = bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt()) 27 | 28 | user = User(email=email, hash=hashed) 29 | db.session.add(user) 30 | db.session.commit() 31 | 32 | return f'Welcome! {email}', 200 33 | except IntegrityError: 34 | # the rollback func reverts the changes made to the db ( so if an error happens after we commited changes they will be reverted ) 35 | db.session.rollback() 36 | return 'User Already Exists', 400 37 | except AttributeError: 38 | return 'Provide an Email and Password in JSON format in the request body', 400 39 | 40 | 41 | @app.route('/login', methods=['POST']) 42 | def login(): 43 | try: 44 | email = request.json.get('email', None) 45 | password = request.json.get('password', None) 46 | 47 | if not email: 48 | return 'Missing email', 400 49 | if not password: 50 | return 'Missing password', 400 51 | 52 | user = User.query.filter_by(email=email).first() 53 | if not user: 54 | return 'User Not Found!', 404 55 | 56 | 57 | if bcrypt.checkpw(password.encode('utf-8'), user.hash): 58 | return f'Logged in, Welcome {email}!', 200 59 | else: 60 | return 'Invalid Login Info!', 400 61 | except AttributeError: 62 | return 'Provide an Email and Password in JSON format in the request body', 400 63 | -------------------------------------------------------------------------------- /simple-press-detect/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 35 | 36 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 39 | 40 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tutorial Code 2 | 3 | ## Code connected to YT videos: 4 | 5 | ### React: 6 | 7 | - simple-press-detect: https://youtube.com/shorts/3RyC0F1jkpo 8 | - react-ultimate-click-outside: https://www.youtube.com/watch?v=OJQ_oF-Yv9o 9 | 10 | ### Flask: 11 | 12 | - flask-email: https://www.youtube.com/watch?v=1Xvb2n17FqU 13 | - flask-file-upload: https://www.youtube.com/watch?v=zMhmZ_ePGiM 14 | - flask-bcrypt: https://www.youtube.com/watch?v=xPW1MSMd_B0 15 | - flask-jwt-auth: https://www.youtube.com/watch?v=AsQ8OcVvK3U 16 | - flask-google-oauth2: https://www.youtube.com/watch?v=BfYsdNaHrps 17 | - flask-dotenv: https://www.youtube.com/watch?v=3EuB7J5BnjE 18 | - Stripe: 19 | - react-flask-stripe/basic: Starting set up for - https://www.youtube.com/watch?v=Y9EpPc19xjw 20 | - react-flask-stripe/payment-and-webhook: https://www.youtube.com/watch?v=Y9EpPc19xjw 21 | - react-flask-stripe/subscriptions: https://www.youtube.com/watch?v=FguUqxaN-u8 22 | 23 | ### Express 24 | 25 | - express-email: https://www.youtube.com/watch?v=zEKeNOo9woo 26 | - express-file-upload: https://www.youtube.com/watch?v=SAUvlkTDMM4 27 | - express-bcrypt: https://www.youtube.com/watch?v=9yIrM7eZwUE 28 | - express-jwt-auth: https://www.youtube.com/watch?v=BQdm6k4j9kg 29 | - express-google-oauth2: https://www.youtube.com/watch?v=o9e3ex-axzA 30 | - express-dotenv: https://www.youtube.com/watch?v=KFbSHtsJNIA 31 | - Stripe: 32 | - react-express-stripe/basic: Starting set up for - https://www.youtube.com/watch?v=JkSgXgqRH6k 33 | - react-express-stripe/one-time-payment: https://www.youtube.com/watch?v=JkSgXgqRH6k 34 | - react-express-stripe/subscription: https://www.youtube.com/watch?v=CqXjp1vtNwk 35 | - react-express-stripe/webhooks: https://www.youtube.com/watch?v=2mhf8W1wN_M 36 | 37 | ### Discord: 38 | 39 | - js-discord-bot: https://www.youtube.com/watch?v=C_-L283Lyvg 40 | - py-discord-bot: https://www.youtube.com/watch?v=fOc3eGHSemw 41 | 42 | ### Redux 43 | 44 | - react-redux: https://www.youtube.com/watch?v=8NT2UA4ZsbY 45 | 46 | ### Websockets 47 | 48 | - js-express-websockets: https://www.youtube.com/watch?v=wV-fDdHhGqs 49 | - py-websockets: https://www.youtube.com/watch?v=lv0oEnQY1pM 50 | 51 | Note: **The code in this repo is an updated and improved version of the ones from the videos. (Since the videos are unscripted and relatively short there isn't enought time to explain everything and make the code pretty~ish) ** 52 | 53 | Note: If you do find issues or ways to improve the code feel free to open an issue 54 | 55 | If you found the videos or the code helpful give it a star too 56 | -------------------------------------------------------------------------------- /simple-press-detect/src/logo.svg: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------------