First, clone the repository of the project :
mkdir /tmp/project-name
git clone ...
Create a packages.json file in the root, containing the following :
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |
<?php | |
namespace XXX\ToolkitBundle\Tests\Command; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
use Symfony\Component\Console\Tester\CommandTester; | |
use Symfony\Bundle\FrameworkBundle\Console\Application; | |
use XXX\ToolkitBundle\Command\CommonGenerateCommand; | |
First, clone the repository of the project :
mkdir /tmp/project-name
git clone ...
Create a packages.json file in the root, containing the following :
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<?php | |
/** | |
* Create a new custom yoast seo sitemap | |
*/ | |
add_filter( 'wpseo_sitemap_index', 'ex_add_sitemap_custom_items' ); | |
add_action( 'init', 'init_wpseo_do_sitemap_actions' ); | |
// Add custom index |
<?php | |
namespace App\Traits; | |
use Illuminate\Support\Str; | |
use App\Exceptions\InvalidEnumException; | |
trait Enums | |
{ | |
/** |
// ... | |
let webpack = require("webpack"); | |
mix.webpackConfig({ | |
plugins: [ | |
// Choose the language you want to keep (Ex: "fr") | |
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /fr/) | |
] | |
}); |
**/node_modules
prettier --write "**/*.js"
*Don't forget the quotes.MIT License | |
Copyright (c) 2018 Noel Bundick | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
# The official MySQL (https://hub.docker.com/_/mysql/) supports only one MYSQL_DATABASE environment variable. | |
# By modifying the entrypoint and passing shell script, you can create multiple dbs without having to make a mysql image just for this purpose. | |
version: '3' | |
services: | |
# Some other service connecting to mysql | |
db: | |
image: mysql:5.6 |