Skip to content

Instantly share code, notes, and snippets.

View poode's full-sized avatar
:octocat:
Focusing

Abdulazeem Mouneer poode

:octocat:
Focusing
View GitHub Profile
@poode
poode / host-react-app-on-apache-server.md
Created May 21, 2020 16:12 — forked from ywwwtseng/host-react-app-on-apache-server.md
Host react application on Apache server

Host react application on Apache server

Step 1 : Create your app

$ npm install -g create-react-app 
$ create-react-app my-app

Step 2 : Build it for production

@poode
poode / api.js
Created March 22, 2020 14:02 — forked from chatman-media/api.js
final-fb-passport
const express = require('express');
const passport = require('passport');
const router = express.Router();
const { fbAuth, fbCb } = require('../lib/facebook');
router.get('/oauth/:id/facebook', fbAuth);
router.get('/oauth/:id/facebook', fbAuth());
module.exports = router;
@poode
poode / postman-deb.sh
Created March 16, 2020 23:15 — forked from SanderTheDragon/postman-deb.sh
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
ls Postman*.tar.gz > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Removing old Postman tarballs"
rm -f $(ls Postman*.tar.gz)
fi
curlExists=$(command -v curl)
@poode
poode / Install MSOffice on Ubuntu.md
Created March 12, 2020 10:36 — forked from raelgc/Install MSOffice on Ubuntu.md
Install MSOffice on Ubuntu

Install Microsoft Office 2010 on Ubuntu

Requirements

We'll install MSOffice using the PlayOnLinux wizard. Additionally, MSOffice requires samba and winbind to properly work.

So, if not installed, install them:

sudo apt-get install playonlinux samba winbind
@poode
poode / Install MSOffice on Ubuntu.md
Created March 12, 2020 10:36 — forked from raelgc/Install MSOffice on Ubuntu.md
Install MSOffice on Ubuntu

Install Microsoft Office 2010 on Ubuntu

Requirements

We'll install MSOffice using the PlayOnLinux wizard. Additionally, MSOffice requires samba and winbind to properly work.

So, if not installed, install them:

sudo apt-get install playonlinux samba winbind
const express = require('express');
const app = express();
// Application
app.get('/', function(req, res) {
if (process.env.NODE_ENV === 'development') {
for (var key in require.cache) {
delete require.cache[key];
}
}
@poode
poode / Error-Handling-Patterns-Express.md
Created August 21, 2018 05:57 — forked from zcaceres/Error-Handling-Patterns-Express.md
error handling patterns in Express

Handling Errors

Express.js makes it a breeze to handle errors in your routes.

Express lets you centralizes your error-handling through middleware.

Let's look at patterns for how to get the most out of your error-handling.

First, our error-handling middleware looks like this:

@poode
poode / AppServiceProvider.php
Created May 15, 2018 05:55 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()