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 | |
function getLocationGroup() { | |
// из конфига config.php | |
global $defaultLocationsGroup; | |
$obCache = new CPHPCache; | |
if($obCache->InitCache(7200, "cities", "/klamas/all")) { | |
$locationsCache = $obCache->getVars(); | |
$locations = $locationsCache['cities']; |
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 | |
namespace App\Controller\Component; | |
use Cake\Controller\Component; | |
use Cake\Utility\Security; | |
class JTokensComponent extends Component { | |
public $secretKey; | |
public $algorythm = "HS256"; | |
public $type = "JWT"; | |
public $payload = []; |
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 | |
namespace App\Controller\Component; | |
use Cake\Controller\Component; | |
use Cake\Auth\DefaultPasswordHasher; | |
class PasswordComponent extends Component { | |
public function generate() { | |
return $this->create_password('##CcC#C'); | |
} | |
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
version: '3' | |
services: | |
apache: | |
build: ./apache/ | |
ports: | |
- "8080:8080" | |
volumes: | |
- /your/path:/var/www/app/ | |
nginx: |
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
FROM ubuntu:18.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update | |
RUN apt-get install -y apache2 | |
RUN apt-get install -y php php-common php-cli php-mysql php-curl \ |
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
FROM ubuntu:18.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update | |
RUN apt-get install -y nginx | |
RUN mkdir /var/www/app/ |
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
#!/usr/bin/env ruby | |
require 'open3' | |
require 'fileutils' | |
def run_command(command) | |
puts("+: " + command) | |
Open3.popen2e(command) do |stdin, stdout_stderr, wait_thread| | |
Thread.new do | |
stdout_stderr.each {|l| puts l } |
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 | |
namespace App\Database\Type; | |
use Cake\Database\Driver; | |
use Cake\Database\Type; | |
class FileType extends Type | |
{ | |
/** | |
* Marshalls flat data into PHP objects. |
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
// get a string representation of the client's timezone | |
console.log(Intl.DateTimeFormat().resolvedOptions().timeZone); |
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 | |
return [ | |
'inputContainer' => '<div class="form-group {{required}}">{{content}}<small class="form-text text-muted">{{help}}</small></div>', | |
'inputContainerError' => '<div class="form-group {{required}} error">{{content}}<small class="form-text text-muted">{{help}}</small>{{error}}</div>', | |
'error' => '<div class="invalid-field">{{content}}</div>', | |
'input' => '<input type="{{type}}" class="form-control" name="{{name}}"{{attrs}} />', | |
// 'checkbox' => '<input type="checkbox" class="form-check-input" name="{{name}}" value="{{value}}"{{attrs}}>', | |
'checkboxFormGroup' => '<div class="form-check">{{label}}</div>', | |
'checkboxWrapper' => '<div class="form-check">{{label}}</div>', | |
'nestingLabel' => '{{hidden}}{{input}}<label {{attrs}}>{{text}}</label>', |
OlderNewer