Skip to content

Instantly share code, notes, and snippets.

View SmetDenis's full-sized avatar
🏠
Working at home

Denis Smet SmetDenis

🏠
Working at home
View GitHub Profile
<?php
namespace Figures;
class Figure
{
protected $color;
<?php
$type = $_POST['type'];
$result = $_POST['data']['result'];
$output = "";
if ($type == 'file') {
$file = fopen('db.txt', 'a+');
fwrite($file, $result);
<?php declare(strict_types=1);
/**
* Задача
* - Написать программу, которая выводит цифры от 1 - 50.
* - Условия: Если, цифру можно делить на 5, то программа должна вывести не цифру, а вывести слово "да".
* - Если можно цифру разделить на 7, то программа должна вывести не цифру, а вывести слово - "нет".
* - Если цифру можно делить на 5 и на 7, то программа должна вывести не цифру, а вывести слово - "данет".
*/
-server
-Xms3G
-Xmx6G
-XX:-UseParNewGC
-XX:-UseConcMarkSweepGC
-XX:+UseG1GC
-XX:+OmitStackTraceInFastThrow
-XX:+AggressiveOpts
-XX:CompileThreshold=4250
-XX:ReservedCodeCacheSize=384m
body {
white-space: pre;
font-family: Consolas;
background-color: #333;
color: #fff;
}
.property {
font-weight: bold;
}
# Отключить индексацию файлов
sudo mdutil -a -i off
#!/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 "$@"
@SmetDenis
SmetDenis / ho_conversions.php
Created May 17, 2018 15:28
ho_conversions.php
<?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,
# 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:
################ 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.