Skip to content

Instantly share code, notes, and snippets.

View hillal20's full-sized avatar

Hilal Aissani hillal20

View GitHub Profile
function Linkedlist(){
this.head = null;
}
Linkedlist.prototype.isEmpty = function(){
return this.head === null;
};
//////////////////////////////////////
Linkedlist.prototype.size = function(){
@hillal20
hillal20 / server.js
Last active May 3, 2018 18:52 — forked from luishrd/index.js
const express = require('express');
const helmet = require('helmet'); // 1 yarn add helment || npm i helmet // 2
// import db from './data/db';
const userRoutes = require('./users/userRoutes');
const server = express();
// client -> [error, m1, post, m3] -> [rh1, rh2]
function greeter(name) {
@hillal20
hillal20 / Character.js
Created May 10, 2018 18:22 — forked from luishrd/Character.js
MongoDB Sprint
const mongoose = require('mongoose');
const ObjectId = mongoose.Schema.Types.ObjectId;
const Character = mongoose.Schema({
name: { type: String, required: true },
edited: Date,
created: Date,
gender: String,
height: String,
hair_color: String,
@hillal20
hillal20 / App.js
Created May 17, 2018 18:30 — forked from luishrd/App.js
JWT Server, all other files remain the same
// /src/App.js
import React, { Component } from 'react';
import { Route, withRouter } from 'react-router-dom';
import logo from './logo.svg';
import './App.css';
import Signin from './auth/Signin';
import Users from './users/Users';
@hillal20
hillal20 / index.js
Created May 21, 2018 19:06 — forked from luishrd/index.js
Client Testing
// inside __tests__ folder
const utilities = require('../index');
describe('default', () => {
it('run the tests', () => {});
});
describe('add function', () => {
it('should add two numbers', () => {
@hillal20
hillal20 / index.js
Created May 21, 2018 19:06 — forked from luishrd/index.js
Client Testing
// inside __tests__ folder
const utilities = require('../index');
describe('default', () => {
it('run the tests', () => {});
});
describe('add function', () => {
it('should add two numbers', () => {
// /.gitignore
# See https://help.github.com/ignore-files/ for more about ignoring files.
# dependencies
/node_modules
# testing
/coverage
@hillal20
hillal20 / .gitignore
Created May 24, 2018 19:11 — forked from luishrd/.gitignore
Server Testing
node_modules
.DS_Store
.vscode
fugqLHz2qPTQZft2PPGOW3AJ4FBSwETewiuEPBX3fwI6NU1U8L3VReheIqkxYwDi/r8LqDkRmY1zEtktEUk80w==
jaksjskskskskskssksksksk