Skip to content

Instantly share code, notes, and snippets.

Mohamed KEITA medesko

Block or report user

Report or block medesko

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
@medesko
medesko / roles_invesitgation.md
Created Feb 15, 2018 — forked from facultymatt/roles_invesitgation.md
Roles and permissions system for Nodejs
View roles_invesitgation.md
@medesko
medesko / index.js
Created Jan 12, 2017
NodeJS Promise
View index.js
var child_process = require('child_process');
function execute(command) {
return new Promise(function(resolve, reject) {
doExecute(resolve, reject, command)
});
}
function executeFile(file, options) {
return new Promise(function(resolve, reject) {
@medesko
medesko / api.service.ts
Created Jan 12, 2017
Angular 2 - PERFORMANCE
View api.service.ts
import {
Injectable,
Injector,
} from '@angular/core';
import 'rxjs/add/operator/toPromise';
import {Router} from '@angular/router';
import {
Http,
RequestOptions,
@medesko
medesko / auth.guard.ts
Last active Jun 14, 2017
Angular 2 - PERFORMANCE
View auth.guard.ts
import { Injectable } from '@angular/core';
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
import { ApiService } from '../services/api.service';
@Injectable()
export class AuthGuard implements CanActivate {
constructor(private router:Router, private _apiService:ApiService) {}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot){
console.log('AuthGuard#canActivate called');
@medesko
medesko / node-forever-upstart.conf
Created Oct 9, 2015 — forked from hyubs/node-forever-upstart.conf
NodeJS, Forever, and Upstart (Ubuntu)
View node-forever-upstart.conf
#!upstart
start on filesystem and started networking
stop on shutdown
expect fork
setuid ubuntu
env HOME="/home/ubuntu"
@medesko
medesko / InstallationStack.md
Created Oct 8, 2015 — forked from pjnovas/InstallationStack.md
Complete Install on Ubuntu Server of Nodejs + MongoDB + NGINX
View InstallationStack.md

##Ubuntu Server

NodeJS

sudo apt-get install g++ curl libssl-dev apache2-utils git-core make
cd /usr/local/src
wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
tar -xvzf node-v0.10.28.tar.gz
cd node-v0.10.28
View gist:6192982
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML5 Local Storage Example</title>
<!-- include Bootstrap CSS for layout -->
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet">
You can’t perform that action at this time.