This file contains hidden or 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
| SELECT dateadd(ss, {field_name}, '19700101') FROM {your_table} |
This file contains hidden or 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
| last_day_of_the_month = (Date.parse(year_to_process + "-" + (month_to_process.to_i + 1).to_s + "-01") - 1).mday().to_s rescue "31" |
This file contains hidden or 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
| UPDATE {table_name} SET {field_name} = REPLACE( {field_name} ,'\"',"") |
This file contains hidden or 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
| my $pad_start = wday_from_ts($y, $m, 1); | |
| my $pad_end = 6 - wday_from_ts($y, $m, $days_in_month); |
This file contains hidden or 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
| my $pad_start_tmp = wday_from_ts($y, $m, 1); | |
| my $pad_start = ($pad_start_tmp == 0) ? 6 : $pad_start_tmp - 1; | |
| my $pad_end = wday_from_ts($y, $m, $days_in_month) + 1; |
This file contains hidden or 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
| server { | |
| listen 80; | |
| server_name www.yourdomain.com | |
| ## root | |
| root /path/to/your/document_root/; | |
| ## global rewrites |
This file contains hidden or 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 USER 'DB_USERNAME'@'localhost' IDENTIFIED BY 'DB_PASSWORD'; | |
| GRANT USAGE ON * . * TO 'DB_USERNAME'@'localhost' IDENTIFIED BY 'DB_PASSWORD' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; | |
| CREATE DATABASE IF NOT EXISTS `DB_USERNAME` ; | |
| GRANT ALL PRIVILEGES ON `DB_USERNAME` . * TO 'DB_USERNAME'@'localhost'; | |
| #For connection from everywhere | |
| GRANT USAGE ON * . * TO 'DB_USERNAME'@'%' IDENTIFIED BY 'DB_PASSWORD' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 | |
| GRANT ALL PRIVILEGES ON `DB_USERNAME` . * TO 'DB_USERNAME'@'%'; |
This file contains hidden or 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
| security: | |
| providers: | |
| chain_provider: | |
| chain: | |
| providers: [in_memory, fos_userbundle] | |
| in_memory: | |
| memory: | |
| users: | |
| foo: { password: test } | |
| fos_userbundle: |
This file contains hidden or 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
| { | |
| "name": "symfony/framework-standard-edition", | |
| "description": "The \"Symfony Standard Edition\" distribution", | |
| "autoload": { | |
| "psr-0": { "": "src/" } | |
| }, | |
| "require": { | |
| "php": ">=5.3.3", | |
| "symfony/symfony": "2.1.*@stable", |
This file contains hidden or 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 | |
| namespace Hpatoio\UserBundle\EventListener; | |
| use Symfony\Component\HttpFoundation\RedirectResponse; | |
| use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
| use Symfony\Component\Security\Core\SecurityContext; | |
| use Symfony\Bundle\FrameworkBundle\Routing\Router; | |
| use Symfony\Component\HttpFoundation\Session\Session; |