These rules are adopted from the AngularJS commit conventions.
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
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.
<?php | |
/** | |
* Generates human-readable string. | |
* | |
* @param string $length Desired length of random string. | |
* | |
* retuen string Random string. | |
*/ | |
function readable_random_string($length = 6) |
#Understanding closures, callbacks and promises
For a code newbie like myself, callbacks, closures and promises are scary JavaScript concepts.
10 months into my full-time dev career, and I would struggle to explain these words to a peer.
So I decided it was time to face my fears, and try to get my head around each concept.
Here are the notes from my initial reading. I'll continue to refine them as my understanding improves.
"===[ Settings ]======================================================== | |
" Autocomplete using Firefox Awesomebar subsystem | |
set complete=l | |
" Show completions as you type? '' waits for tab, 'auto' shows them immediately | |
set wildoptions='' | |
" Select the longest autocomplete match | |
set wildmode='list:full' |
<?php | |
return [ | |
'components' => [ | |
'db' => [ | |
'class' => '\yii\db\Connection', | |
'dsn' => 'mysql:host=127.0.0.1;dbname=demo', | |
'username' => 'root', | |
'password' => '', | |
'charset' => 'utf8', |
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. |
// in config/main.php | |
'params' => array( | |
'defaultPageSize' => 20, | |
), | |
// in controller action | |
public function actionIndex() | |
{ | |
if ( isset( $_GET[ 'pageSize' ] ) ) | |
{ |
<?php | |
namespace common\exception; | |
use e96\sentry\ErrorHandler; | |
use yii\base\Exception; | |
use yii\db\ActiveRecord; | |
class CantSave extends Exception |