Skip to content

Instantly share code, notes, and snippets.

Starting on git hub

Nelson edoves

Starting on git hub
Block or report user

Report or block edoves

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
edoves / reactaxiosadependecy.js
Last active Nov 12, 2019
Calling FetchAPI and Axios
View reactaxiosadependecy.js
import React, { Component } from "react";
import axios from "axios";
import "./App.css";
import { recipes } from "./tempList";
import { AUTH_KEY } from "./config";
import RecipeList from "./components/RecipeList";
import RecipeDetails from "./components/RecipeDetails";
class App extends Component {
state = {
edoves / app.js
Last active Sep 15, 2019
Sample server Express
View app.js
const express = require("express");
const app = express();
// logger
const morgan = require("morgan");
const productRoutes = require("./api/routes/products");
const orderRoutes = require("./api/routes/orders");
// using the morgan the resul will beo nthe terminal
View NPMCommand.text
* Check to see the list of installed packages on your app and their folders inside it
sample command: npm list
* Check to see the list of installed packages of your application, it will return the main folder
sample command: npm list --depth=0
* Check to see the dependencies a package depend on
sample command: npm view mongoose
this show only the dependencies
sample command npm view mongoose dependencies
for version of the package installed
View installation code for react
npm i react react-dom
npm i -D @babel/core @babel/preset-env @babel/preset-react webpack webpac-cli webpack-dev-server babel-loader css-loader style-loader html-webpack-plugin
edoves / auth_functions.php
Last active Nov 13, 2019
mysqlcommand, mysqlconnect php, mysqliconnectOOP version php
View auth_functions.php
// Performs all actions necessary to log in an admin
function log_in_admin($admin) {
// Renerating the ID protects the admin from session fixation.
$_SESSION['admin_id'] = $admin['id'];
$_SESSION['last_login'] = time();
$_SESSION['username'] = $admin['username'];
return true;
You can’t perform that action at this time.