Skip to content

Instantly share code, notes, and snippets.

@afadhinc
afadhinc / passport.js
Created August 14, 2021 07:10 — forked from manjeshpv/passport.js
Passport.js using MySQL for Authentication with Express https://manjeshpv.github.io/mean-development-guide-2021/
// 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',
@afadhinc
afadhinc / creditBalanceSidebar.php
Created July 4, 2021 08:32 — forked from jwieder/creditBalanceSidebar.php
Place this hook script in the includes/hooks/ directory of the WHMCS folder within your server's webroot to display each client's available credit balance as a sidebar item within the WHMCS Client Area homepage and billing-related pages. Created by combining elements from two scripts from the WHMCS forums and fixing several issues with both. Tes…
<?php
/**
* Display Client's Credit Balance as a Sidebar Item in Client Area Homepage and Billing-related Pages
*
* @author Josh Wieder
* @link https://gist.github.com/jwieder/3d470a4e85e041ca41bc2cee0c5aa7a8#file-creditbalancesidebar-php
* @since WHMCS v6.0.0+
*/
@afadhinc
afadhinc / UploadStrapi.js
Last active January 24, 2021 08:59 — forked from alexandrebodin/index.js
Uploading images to strapi with react and axios
import React, { Component } from 'react';
import axios from 'axios';
import './App.css';
class App extends Component {
constructor() {
super();
this.state = {
images: [],
@afadhinc
afadhinc / Knex-Setup.md
Created November 14, 2020 07:14 — forked from NigelEarle/Knex-Setup.md
Setup Knex with Node.js

Knex Setup Guide

Create your project directory

Create and initialize your a directory for your Express application.

$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init