Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View FantomX1-github's full-sized avatar

Frantisek Hallo FantomX1-github

View GitHub Profile
@FantomX1-github
FantomX1-github / CleanArchitecture.md
Created September 11, 2018 15:22 — forked from ygrenzinger/CleanArchitecture.md
Summary of Clean Architecture by Robert C. Martin

Summary of book "Clean Architecture" by Robert C. Martin

Uncle Bob, the well known author of Clean Code, is coming back to us with a new book called Clean Architecture which wants to take a larger view on how to create software.

Even if Clean Code is one of the major book around OOP and code design (mainly by presenting the SOLID principles), I was not totally impressed by the book.

Clean Architecture leaves me with the same feeling, even if it's pushing the development world to do better, has some good stories and present robust principles to build software.

The book is build around 34 chapters organised in chapters.

@FantomX1-github
FantomX1-github / readable_random_string.php
Created August 27, 2018 14:26 — forked from sepehr/readable_random_string.php
PHP: Human-readable Random String
<?php
/**
* Generates human-readable string.
*
* @param string $length Desired length of random string.
*
* retuen string Random string.
*/
function readable_random_string($length = 6)
@FantomX1-github
FantomX1-github / gitBash_windows.md
Created June 21, 2018 11:39 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@FantomX1-github
FantomX1-github / CantSave.php
Created May 19, 2018 18:13 — forked from m8rge/ CantSave.php
Yii2 exception for non-saved active records
<?php
namespace common\exception;
use e96\sentry\ErrorHandler;
use yii\base\Exception;
use yii\db\ActiveRecord;
class CantSave extends Exception
@FantomX1-github
FantomX1-github / zalenium-template.yaml
Created April 24, 2018 01:39 — forked from mojsha/zalenium-template.yaml
OpenShift template for Zalenium
apiVersion: v1
kind: Template
metadata:
name: zalenium
annotations:
"openshift.io/display-name": "Zalenium"
"description": "Disposable Selenium Grid for use in OpenShift"
message: |-
A Zalenium grid has been created in your project. Continue to overview to verify that it exists and start the deployment.
@FantomX1-github
FantomX1-github / drop-down-page-size-cgrid-view.php
Created December 28, 2017 15:58 — forked from umidjons/drop-down-page-size-cgrid-view.php
Yii: drop down to choose page size for CGridView
// in config/main.php
'params' => array(
'defaultPageSize' => 20,
),
// in controller action
public function actionIndex()
{
if ( isset( $_GET[ 'pageSize' ] ) )
{
@FantomX1-github
FantomX1-github / 0_reuse_code.js
Last active August 29, 2015 14:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console