- Clear feature ownership
- Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace project | |
{ | |
// ... | |
public class AccountsController : Controller { | |
// ... | |
[HttpGet, Route("accounts/manage/change-passwords", Name="change-password")] | |
[Authorize(Roles="Admin")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
#uncomment next line if silex app root is in a mamp subdirectory | |
#RewriteBase /your_mamp_htdocs_silex_app_root | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^ web/index.php [L] | |
</IfModule> | |
define your silex routes as follows: | |
$app->get('/your_mamp_htdocs_silex_app_root/', function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Messaging; | |
using System.Text; | |
using Newtonsoft.Json; | |
public class JsonMessageFormatter : IMessageFormatter | |
{ | |
private static readonly JsonSerializerSettings DefaultSerializerSettings = | |
new JsonSerializerSettings { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder; | |
$encoder = new MessageDigestPasswordEncoder(); | |
echo $encoder->encodePassword('foo', ''); | |
// 5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# | |
Source: http://dev.dbl-a.com/symfony-2-0/symfony2-and-twig-pagination/ | |
Updated by: Simon Schick <[email protected]> | |
Parameters: | |
* currentFilters (array) : associative array that contains the current route-arguments | |
* currentPage (int) : the current page you are in | |
* paginationPath (string) : the route name to use for links | |
* showAlwaysFirstAndLast (bool) : Always show first and last link (just disabled) | |
* lastPage (int) : represents the total number of existing pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `documents` ( | |
`id` INT NOT NULL AUTO_INCREMENT, | |
`id_category` INT NOT NULL, | |
-- `id_department` INT NOT NULL, | |
`title` VARCHAR(150) NOT NULL, | |
`comment` MEDIUMTEXT, | |
`filename` VARCHAR(150), | |
`ts` timestamp DEFAULT CURRENT_TIMESTAMP, | |
PRIMARY KEY (`id`), | |
FOREIGN KEY (`id_category`) REFERENCES categories(`id`) ON DELETE NO ACTION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#nav-bar ul { | |
list-style-type: none; | |
} | |
#nav-bar { | |
padding-left: 0; | |
} | |
#nav-bar > ul { | |
padding-left: 20px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost localhost:YOUR_PORT> | |
ServerName localhost | |
Define WebDirPath WEB_ROOT_DIR_PATH | |
DocumentRoot ${WebDirPath} | |
Alias /YOUR_PROJECT_NAME ${WebDirPath} | |
<Directory ${WebDirPath}> | |
Options -Indexes |
- We call for the minified Vue.js library that’s hosted on our own server (for security reasons).
- Download the Development version: https://vuejs.org/js/vue.js and the production version: https://vuejs.org/js/vue.min.js
- Copy this files into the public/js folder