Skip to content

Instantly share code, notes, and snippets.

View Shipu's full-sized avatar
🎯
Focusing

Shipu Ahamed Shipu

🎯
Focusing
View GitHub Profile
@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 / startup.sh
Last active July 23, 2018 19:08
Ubuntu Startup (Test on 17.10)
#!/usr/bin/env bash
# nginx
# php 7.2 & php 5.6
# mysql 5.7
# postgresql 9.4
# phpmyadmin
# node js stable
# docker ( ce )
# go (stable)
# composer
@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 / 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 / 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
{
"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 / php-version-switcher.sh
Last active August 20, 2019 18:34
Switch php versions in ubuntu
echo "Enter the php version you want to Disable:"
read disabledVersion
echo "Enter the php version you want to Enable:"
read enabledVersion
sudo a2dismod php${disabledVersion}
sudo a2enmod php${enabledVersion}
sudo service apache2 restart
# or
sudo service nginx restart
@Shipu
Shipu / .env7-1
Last active October 27, 2019 06:19
Laradock Configuration
###########################################################
###################### General Setup ######################
###########################################################
### Paths #################################################
# Point to the path of your applications code on your host
APP_CODE_PATH_HOST=../7.1/
# Point to where the `APP_CODE_PATH_HOST` should be in the container
@Shipu
Shipu / string-eval.php
Created December 25, 2019 12:01
String with function
<?php
function day($value) {
return date('d', strtotime($value));
}
function equal($one, $second) {
return $one == $second;
}
@Shipu
Shipu / AdapterPattern.php
Created May 9, 2020 15:33
Adapter pattern real life example
<?php
interface SocialInterface
{
public function getFriends();
public function getPosts();
}
class Facebook implements SocialInterface
{