Skip to content

Instantly share code, notes, and snippets.

View Shipu's full-sized avatar
🎯
Focusing

Shipu Ahamed Shipu

🎯
Focusing
View GitHub Profile
{
"id": 56145,
"sub_total": "2671.00",
"coupon_discount": "0.00",
"delivery_charge": "50.00",
"total": "2721.00",
"status": 10,
"payment_status": 3,
"paid_amount": "2721.00",
"invoice_email": null,
@Shipu
Shipu / full-setup-18
Created April 21, 2019 03:26 — forked from TuserSheikh/full-setup-18
startup for ubuntu
#!/usr/bin/env bash
if [[ -z `grep "net.ipv6.conf.all.disable_ipv6 = 1" /etc/sysctl.conf` ]]; then
echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
fi
sudo sysctl -p
@Shipu
Shipu / docker-compose.yml
Created March 30, 2019 13:11
Docker Lamp
version: "3"
services:
webserver:
build:
context: ./bin/webserver
container_name: '5.6.x-webserver'
restart: 'always'
ports:
- "8080:80"
@Shipu
Shipu / .env
Created November 13, 2018 09:49
accounting env
APP_NAME=Akaunting
APP_ENV=production
APP_LOCALE=en-GB
APP_INSTALLED=true
APP_KEY=base64:wuPocbFwZTuWQoiVFTzyMU7ZNe8CTq0CY6pf3G8nIQI=
APP_DEBUG=false
APP_LOG_LEVEL=debug
APP_URL=http://akaunting.lrvl
DB_CONNECTION=mysql
@Shipu
Shipu / config.sh
Created July 16, 2018 18:23 — forked from itsmelion/config.sh
Mac OSX SUPER-Configuration
#!/bin/sh
# xcode command line - Select: "Get xcode" and go get a coffee (preferably far from your desk :)
xcode-select --install
# homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# will ask to install the command line tools for macOS if the previous step was not executed
brew tap caskroom/cask
brew tap caskroom/versions
@Shipu
Shipu / mac-startup.sh
Last active July 12, 2018 21:17
Mac Startup
xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew tap homebrew/services
brew install bash-completion
@Shipu
Shipu / installer
Last active May 4, 2018 10:59
laravel installer sample class
<?php
namespace Shipu\Installer;
use App;
use Config;
/**
* Class Installer
* @package App
*/
@Shipu
Shipu / Laravel-Container.md
Created April 8, 2018 19:14
Laravel's Dependency Injection Container in Depth

Laravel's Dependency Injection Container in Depth

Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.

Introduction to Dependency Injection

I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).

Accessing the Container

@Shipu
Shipu / domain-wildcard-nginx.conf
Last active March 30, 2018 12:59
Automatic Virtual host
server {
listen 80;
listen [::]:80;
server_name ~^(www\.)?(?<sname>.+?)$;
root /var/www/html/$sname;
index index.php index.html index.htm;
location / {