Skip to content

Instantly share code, notes, and snippets.

@zhilinskiy
zhilinskiy / Laravel-Container.md
Created Feb 17, 2021
Laravel's Dependency Injection Container in Depth
View Laravel-Container.md

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

@zhilinskiy
zhilinskiy / .php-cs-fixer.dist.php
Last active Sep 13, 2021 — forked from tabacitu/.php-cs-fixer.dist.php
PHP-CS-Fixer Configuration File for the Laravel Code Style
View .php-cs-fixer.dist.php
<?php
/**
-----------------------------------------------------
Enforce the Laravel Code Style using PHP CS Fixer 3.x
-----------------------------------------------------
Credits go to Laravel Shift & Andreas Elia.
https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
@zhilinskiy
zhilinskiy / CSS: CSS3 image slider with stylized thumbnails
Created Jan 23, 2013
CSS: CSS3 image slider with stylized thumbnails
View CSS: CSS3 image slider with stylized thumbnails
/*==================================================================
= CSS3 image slider with stylized thumbnails =
==================================================================*/
/**
*NEED BROWSER PREFIXES!!!!!!!!!!!
* <!--
We will make a slider with stylized thumbnails using CSS3
The markup is very simple:
Radio Inputs
Labels with thumbnails to detect click event
View CSS: Fonts Stacks
/**
*
* Font Staks
*http://sixrevisions.com/css/css-typography-01/
*
* Wide sans serif: Verdana, Geneva
Narrow sans serif: Tahoma, Arial, Helvetica
Wide serif: Georgia, Utopia
Narrow serif: Times, Times New Roman
Monospace: Courier, Courier New, Lucida Console
@zhilinskiy
zhilinskiy / CSS: accordian style slider in CSS3
Created Jan 23, 2013
CSS: accordian style slider in CSS3
View CSS: accordian style slider in CSS3
/*======================================================
= accordian style slider in CSS3 =
======================================================*/
/**
*http://thecodeplayer.com/walkthrough/make-an-accordian-style-slider-in-css3
* <!-- We will make a simple accordian with hover effects
The markup will have a list with images and the titles-->
<div class="accordian">
<ul>
<li>
@zhilinskiy
zhilinskiy / CSS: Prevent Long URL’s From Breaking Out of Container
Created Jan 29, 2013
CSS: Prevent Long URL’s From Breaking Out of Container
View CSS: Prevent Long URL’s From Breaking Out of Container
.prevent-text-breakouts {
-ms-word-break: break-all;
word-break: break-all;
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
@zhilinskiy
zhilinskiy / CSS: Responsive CSS gorizontal menu
Created Jan 24, 2013
CSS: Responsive CSS gorizontal menu
View CSS: Responsive CSS gorizontal menu
/*======================================================
= Responsive CSS gorizontal menu =
======================================================*/
/**
*
* http://webdesignerwall.com/tutorials/css-responsive-navigation-menu
* Internet Explorer Support
* <!--[if lt IE 9]>
<script src="http://css3-mediaqueries-js.googlecode.com/files/css3-mediaqueries.js"></script>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
View CSS: One element CSS ribbon
/*=============================================
=One element CSS ribbon (Need browser prefixes!!!!) =
=============================================*/
/**
*
* <!-- Lets make a cool single element ribbon -->
<h1>Single Element - Pure CSS3 </h1>
http://thecodeplayer.com/walkthrough/single-element-pure-css3-double-fold-ribbon
*
@zhilinskiy
zhilinskiy / gist:4407138
Created Dec 29, 2012
CSS: Retina Display Media Query
View gist:4407138
/*
http://www.brettjankord.com/2012/11/28/cross-browser-retinahigh-resolution-media-queries/
http://css-tricks.com/snippets/css/retina-display-media-query/
*/
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}