Skip to content

Instantly share code, notes, and snippets.

View napestershine's full-sized avatar
🎯
Focusing

Manu napestershine

🎯
Focusing
View GitHub Profile
@napestershine
napestershine / install.sh
Created January 31, 2022 12:53
Install IMAP extension on Amazon Elastic Beanstalk PHP Amazon Linux 2 Platform
#!/bin/bash
PATH=pwd
sudo yum groupinstall "Development Tools" -y
sudo amazon-linux-extras install epel -y
sudo yum install epel-release
sudo yum install libc-client-devel uw-imap-static openssl-devel -y
sudo ln -s /usr/lib64/libc-client.a /usr/lib
cd ~

Update 7/28/2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

Steps:

  1. Open VirtualBox
  2. Right-click your VM, then click Settings
  3. Go to Shared Folders section
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /index.php/
Higher Order Component in React JS
When 2 or more components have same kind of functionality with same handlers event and same html generation,
Like Manoj.js and Chhavi.js
Chhavi.js
import React from "react";
class Manoj extends React.Component {
state={
gunshots:0
}
handleGunshot=()=>
@napestershine
napestershine / xampp_php7_xdebug.md
Created January 26, 2019 13:32 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP

Installing Xdebug for XAMPP with PHP 7.x

Requirements

Setup

@napestershine
napestershine / A Nuxt.js VPS production deployment.md
Created July 12, 2018 04:37 — forked from DreaMinder/A Nuxt.js VPS production deployment.md
Deployment manual for a real-world project built with nuxt.js + koa + nginx + pm2

Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin SPA, nuxt.js renderer and JSON API.

This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger then a landing page.


Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:

1.Initial setup.

@napestershine
napestershine / lumen-filesystem.md
Created July 11, 2018 04:25 — forked from deividaspetraitis/lumen-filesystem.md
Lumen flysystem ( filesystem ) integration

Lumen flysystem integration

By default lumen doesn't support laravel file system. In order to integrate to lumen we need follow these instructions:

  1. composer require league/flysystem
  2. Copy filesystems config file from Laravel ( https://github.com/laravel/laravel/blob/master/config/filesystems.php ) to your local Lumen installation document_root/config
  3. Bind filesystem to IoC for example in document_root/bootstrap/app.php by adding this code lines:

`` $app->singleton('filesystem', function ($app) {

git clone https://github.com/attendize/attendize
cd attendize
cp .env.example .env
vi .env #Set the database and mail settings etc.
composer install
php artisan attendize:install
@napestershine
napestershine / glide-carousel-semantic-ui.markdown
Created August 20, 2016 14:33
Glide Carousel & Semantic UI
<nav class="light-blue lighten-1" role="navigation">
<div class="nav-wrapper container"><a id="logo-container" href="#" class="brand-logo">logo</a>
<!-- Dropdown Structure -->
<ul id="account" class="dropdown-content">
<li><a href="{{ path('fos_user_security_login') }}">Login</a></li>
<li class="divider"></li>
<li><a href="{{ path('fos_user_registration_register') }}">Sign up</a></li>
</ul>
<!-- Mobile Dropdown Structure -->
<ul id="maccount" class="dropdown-content">