- Session:
- Removed register_globals related code and "!" can be used as $_SESSION key name.
- Session is made to manage session status correctly and prevents invalid operations.
Only inappropriate codes are affected by this change. If you have problems with this,
it means you have problem in your code.
- Functions are made to set or return correct session status. session_start(), session_status(), session_regenerate_id()
- Functions are made to return bool from null. These functions have void parameter
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
<template> | |
<modal @modal-close="handleClose"> | |
<form | |
@submit.prevent="handleConfirm" | |
slot-scope="props" | |
class="bg-white rounded-lg shadow-lg overflow-hidden" | |
style="width: 460px" | |
> | |
<slot :uppercaseMode="uppercaseMode" :mode="mode"> | |
<div class="p-8"> |
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
var that = this; | |
this.myForm = this.FormBuilder.group({ | |
username: ["", this.Validators.required], | |
password: ["", this.Validators.required], | |
bio: ["", this.Validators.required], | |
}); | |
this.create = function() { | |
console.log("VALUES", that.myForm.valid, that.myForm.value); |
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
Установить Docker CE и docker-compose на систему, если у вас MacOS или Windows | |
вы можете скачать установщик с офф. сайта | |
https://www.docker.com/get-started | |
Если же у вас Linux проводим установку как указано здесь: | |
https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce | |
Далее устанавливаем docker-compose | |
https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-16-04 |
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 | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
$database = 'db'; | |
$user = 'user'; | |
$pass = 'pass'; | |
$host = 'localhost'; |
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
// http://stackoverflow.com/a/5727346/3774582 | |
// Parse CRON frequency | |
// Break it down like James Brown | |
function parse_crontab($time, $crontab) { | |
// Get current minute, hour, day, month, weekday | |
$time = explode(' ', date('i G j n w', strtotime($time))); | |
// Split crontab by space | |
$crontab = explode(' ', $crontab); | |
// Foreach part of crontab | |
foreach ($crontab as $k => &$v) { |
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
Ansible playbook to setup HTTPS using Let's encrypt on nginx. | |
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS. | |
The server pass A rating on [SSL Labs](https://www.ssllabs.com/). | |
To use: | |
1. Install [Ansible](https://www.ansible.com/) | |
2. Setup an Ubuntu 16.04 server accessible over ssh | |
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain | |
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder) |
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
APP_ENV=local | |
APP_DEBUG=true | |
APP_KEY=base64:hyHUpukUUigKeEsxpGeTW4UZ+Lg+WAWxcc4/BjlgNtE= | |
APP_URL=http://localhost | |
DB_CONNECTION=pgsql | |
DB_HOST=hostname | |
DB_PORT=5432 | |
DB_DATABASE=Your database name | |
DB_USERNAME=Your database username |
NewerOlder