Skip to content

Instantly share code, notes, and snippets.

View bosunski's full-sized avatar
:octocat:
Sleeping Here!

Bosun Egberinde bosunski

:octocat:
Sleeping Here!
View GitHub Profile
<?xml version="1.0" ?>
<updates>
<update>
<name>Joomla! 3.1</name>
<description>Joomla! CMS</description>
<element>joomla</element>
<type>file</type>
<version>3.1.3</version>
<infourl title="Joomla!">https://www.joomla.org/</infourl>
<downloads>
@bosunski
bosunski / README-Template.md
Created August 5, 2018 20:47 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

[Joomla!] GSoC 2018: CLI Update Project

Work Description

The goal of my project is to add commands to Joomla! that enables updates to be performed via the CLI. The CLI Update is meant to introduce a faster way to perform some of the administrative operations through the command line.

The initial project repository was here for development and after finishing it was merged into a single pull request and moved here to the official Joomla! Repository for a community wide review and Testing.

All pull request and commits during the initial development can be seen here as well.

@bosunski
bosunski / file.php
Last active September 30, 2018 21:17
CommandBoilerplate.php
<?php
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\Console;
@bosunski
bosunski / .env
Last active September 30, 2018 21:44
2018-09_How_to_use_multiple_callbacks_in_Laravel_Socialite.blade
FACEBOOK_CLIENT_ID=693724864165765
FACEBOOK_CLIENT_SECRET=90d9ddf7dd76aa7a3dfac90b433c4273
FACEBOOK_CLIENT_CALLBACK=/login/facebook/callback
@bosunski
bosunski / FooController.php
Last active October 7, 2018 22:57
Dynamic Form Validation in Laravel
<?php
namespace App\Http\Controllers;
use App\Http\Requests\FooRequest;
class BudgetController extends Controller
{
// ...
@bosunski
bosunski / 2018-10-24 introducing-reactphp-buzz.md
Last active October 25, 2018 10:34 — forked from clue/2018-10-24 introducing-reactphp-buzz.md
Introducing async HTTP requests with ReactPHP

Today, I'm happy to announce the v2.5.0 release of clue/reactphp-buzz 🎉

Simple, async PSR-7 HTTP client for concurrently processing any number of HTTP requests, built on top of ReactPHP.

As the version number suggests, this is not exactly a new project. In fact, this has been used in production in a larger number of projects for a few years already. So I guess it's about time to write an introductory blog post about this project, why async HTTP requests are such a powerful feature and also a bit about the motivation for this project and why I think @ReactPHP is a perfect fit for sending HTTP requests.

HTTP all the things!

I'm probably not telling you something new when I say the web is built on top of HTTP. This blog post is served over HTTP. Your YouTube videos are served over HTTP. Your downloads are served over HTTP. RESTful backend APIs are served over HTTP. GraphQL APIs are served over HTTP. SOAP APIs are served over HTTP. Yes,

@bosunski
bosunski / Laravel-Container.md
Created October 30, 2018 23:01
Laravel's Dependency Injection Container in Depth

Laravel's Dependency Injection Container in Depth

Translations: Korean (by Yongwoo Lee)

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).

<?php
$fileCache = "LastLine.txt";
$oldLastLine = getLastLine($fileCache);
function getLastLine($cachePath)
{
if (file_exists($cachePath))
return file_get_contents($cachePath);
return 0;
@bosunski
bosunski / Wisdom.md
Last active January 18, 2019 00:10

The Lucid Architecture for Laravel was introduced by Abed Halawi in one of the Laracon event and it grants a laravel app a good way to scale the app in terms of the development flexibility. The architecture follows a Domain Driven design approach.

However, even though Lucid Architecture provides a way you can create a fresh project with Lucid, it's quite difficult to implement on an already running project that wants to try out the Structure. the purpose of this article is to take you through how we can still use Lucid in a well ordered manner without it affecting you app initial setup.

This post is written for as many who will like to implement this clear and simple architecture in their laravel project.

We're going to achieve this in few steps, so follow me tightly: