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 Figures; | |
class Figure | |
{ | |
protected $color; |
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 | |
$type = $_POST['type']; | |
$result = $_POST['data']['result']; | |
$output = ""; | |
if ($type == 'file') { | |
$file = fopen('db.txt', 'a+'); | |
fwrite($file, $result); |
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 declare(strict_types=1); | |
/** | |
* Задача | |
* - Написать программу, которая выводит цифры от 1 - 50. | |
* - Условия: Если, цифру можно делить на 5, то программа должна вывести не цифру, а вывести слово "да". | |
* - Если можно цифру разделить на 7, то программа должна вывести не цифру, а вывести слово - "нет". | |
* - Если цифру можно делить на 5 и на 7, то программа должна вывести не цифру, а вывести слово - "данет". | |
*/ |
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
-server | |
-Xms3G | |
-Xmx6G | |
-XX:-UseParNewGC | |
-XX:-UseConcMarkSweepGC | |
-XX:+UseG1GC | |
-XX:+OmitStackTraceInFastThrow | |
-XX:+AggressiveOpts | |
-XX:CompileThreshold=4250 | |
-XX:ReservedCodeCacheSize=384m |
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
body { | |
white-space: pre; | |
font-family: Consolas; | |
background-color: #333; | |
color: #fff; | |
} | |
.property { | |
font-weight: bold; | |
} |
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
# Отключить индексацию файлов | |
sudo mdutil -a -i off |
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 sh | |
# /usr/local/bin/php-x | |
SRC_DIR="`pwd`" | |
cd "`dirname "$0"`" | |
cd "/usr/bin" | |
BIN_TARGET="`pwd`/php" | |
cd "$SRC_DIR" | |
"$BIN_TARGET" -d memory_limit=2048M -dzend_extension=/usr/lib/php/20170718/xdebug.so "$@" |
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 | |
// affiliate_id,offer_id,payout,revenue,datetime,is_adjustment | |
$data = []; | |
$months = [ | |
'2017-10-17 23:55:55' => 11000, | |
'2017-11-17 23:55:55' => 12000, |
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
# https://marmelab.com/blog/2014/09/10/make-docker-command.html | |
# If the first argument is "composer"... | |
ifeq (composer,$(firstword $(MAKECMDGOALS))) | |
# use the rest as arguments for "composer" | |
COMPOSER_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) | |
# ...and turn them into do-nothing targets | |
$(eval $(COMPOSER_ARGS):;@:) | |
endif | |
composer: |
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
################ copy/replace file to ~/.bash_aliases | |
################ Tuning bash ########################################################################################### | |
# Command line history | |
export HISTCONTROL=ignoredups:ignorespace | |
export HISTFILESIZE=10000000 | |
export HISTSIZE=1000000 | |
shopt -s histappend # Append to the history file, don't overwrite it | |
shopt -s checkwinsize # Check the window size after each command and, if necessary, update the values of LINES and COLUMNS. |
NewerOlder