Skip to content

Instantly share code, notes, and snippets.

View jonathanfelicity's full-sized avatar
🎯
Focusing

Jonathan Felicity jonathanfelicity

🎯
Focusing
View GitHub Profile
name: Deploy to cPanel via FTP
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
@jonathanfelicity
jonathanfelicity / clean.py
Last active May 7, 2022 18:47
Arranging and Cleaning files with python
import os
import shutil
class Clean:
def __init__(self, fileExtention, fileFolder):
self.fileExtention = fileExtention;
self.fileFolder = fileFolder;
@attribute
def arrange(self):
@yukeehan
yukeehan / app.js
Created July 16, 2018 02:53
Login/Logout/Register using Passport-Local-Mongoose
var express = require("express"),
mongoose = require("mongoose"),
bodyParser = require("body-parser"),
User = require("./models/user"),
passport = require("passport"),
LocalStrategy = require("passport-local"),
passportLocalMongoose = require("passport-local-mongoose");
mongoose.connect("mongodb://localhost:27017/auth_demo_app", { useNewUrlParser: true });
var app = express();
@jshaw
jshaw / index.html
Created February 20, 2015 21:56
Google Streetview Example
<!DOCTYPE html>
<html>
<head>
<title>Custom Street View panorama tiles</title>
<meta charset="utf-8">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
@manjeshpv
manjeshpv / passport.js
Last active February 29, 2024 15:11
Passport.js using MySQL for Authentication with Express
// config/passport.js
// load all the things we need
var LocalStrategy = require('passport-local').Strategy;
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',