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
@bosunski
bosunski / mysql.database.yml
Created November 14, 2020 13:50 — forked from mmizutani/mysql.database.yml
Sample config/database.yml from Rails. Postgres, MySQL, and SQLite
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
@bosunski
bosunski / gist:98bd8bef0e1ded439db04973f0f45588
Created July 1, 2020 16:01 — forked from betweenbrain/gist:5405671
Use cURL and SimpleXML to retrieve and parse Wordpress RSS feed
<?php
$curl = curl_init();
curl_setopt_array($curl, Array(
CURLOPT_URL => 'http://blogs.guggenheim.org/map/feed/',
CURLOPT_USERAGENT => 'spider',
CURLOPT_TIMEOUT => 120,
CURLOPT_CONNECTTIMEOUT => 30,
CURLOPT_RETURNTRANSFER => TRUE,
@bosunski
bosunski / gist:c934c663c7b6f0cbe2298bff54181e01
Created April 8, 2020 17:42 — forked from kapkaev/gist:4619127
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error. Resque
$ redis-cli
> config set stop-writes-on-bgsave-error no
@bosunski
bosunski / README.md
Created January 31, 2020 12:55 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
@bosunski
bosunski / server.php
Created October 18, 2019 14:48 — forked from IvanChepurnyi/server.php
Simple multi-process ReactPHP server with workers control
<?php
/**
* Copyright © EcomDev B.V. All rights reserved.
* See LICENSE.txt for license details.
*/
declare(strict_types=1);
$port = $argv[1];
$serverName = $argv[2];
@bosunski
bosunski / homebrew-permissions-issue.md
Created February 13, 2019 19:25 — forked from irazasyed/homebrew-permissions-issue.md
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

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

@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 / 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