Skip to content

Instantly share code, notes, and snippets.

View alroniks's full-sized avatar

Ivan Klimchuk alroniks

View GitHub Profile
Some ideas for backend
# Approach
- BDD (DDD ?)
- obviously respect of PSR for open source visibility (ease contributions form any level)
# About Symfony usage
- very strong community
- well maintained and documented ready to use core/components (auth, rendering, console, etc)
- PSR standards implementations (even PSR7 if needed)
@alroniks
alroniks / .env
Last active July 7, 2023 06:48
TAO Development Docker Environment
MYSQL_PORT=33060
NGINX_PORT=80
PROJECT_NAME=tao
<?php
$str = 'fD3_';
$chars = array_merge(range('a', 'z'), range('A', 'Z'), range('0', '9'), ['_']);
$total = 0;
$brut = '';
$len = strlen($str);
/**
* @see: https://www.programmingalgorithms.com/algorithm/brute-force?lang=PHP
*/
<?php
$str = 'fD3_';
$chars = array_merge(range('a', 'z'), range('A', 'Z'), range('0', '9'), ['_']);
$total = 0;
$brut = '';
$len = strlen($str);
/**
* @see: https://www.programmingalgorithms.com/algorithm/brute-force?lang=PHP
*/
@jehaby
jehaby / README.md
Last active January 25, 2024 14:43 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@krishh-konar
krishh-konar / twitter_image_downloader.py
Last active December 21, 2023 18:39
Downloads images/photos uploaded on twitter by a given user.
#!/usr/bin/python
'''
A script that downloads all the pictures posted by a given user.
Author: Krishanu Konar
email: krishanukonar@gmail.com
'''
<?php
$Tickets = $modx->getService('tickets', 'Tickets', $modx->getOption('tickets.core_path', null, $modx->getOption('core_path') . 'components/tickets/') . 'model/tickets/', $scriptProperties);
$Tickets->initialize($modx->context->key, $scriptProperties);
/** @var pdoFetch $pdoFetch */
$fqn = $modx->getOption('pdoFetch.class', null, 'pdotools.pdofetch', true);
if ($pdoClass = $modx->loadClass($fqn, '', false, true)) {
$pdoFetch = new $pdoClass($modx, $scriptProperties);
} elseif ($pdoClass = $modx->loadClass($fqn, MODX_CORE_PATH . 'components/pdotools/model/', false, true)) {
$pdoFetch = new $pdoClass($modx, $scriptProperties);
@parmentf
parmentf / GitCommitEmoji.md
Last active April 25, 2024 08:18
Git Commit message Emoji
this.exp = new Ext.grid.RowExpander({
expandOnDblClick: false,
tpl: new Ext.Template(
'<table class="paymentsystem-expander"><tbody>',
'<tr>',
'<td><b>' + _('paymentsystem_num') + ': </b>{num}</td>',
'<td><b>' + _('paymentsystem_cost') + ': </b>{cost:this.renderMoney}</td>',
'<td><b>' + _('paymentsystem_tax') + ': </b>{tax:this.renderMoney}</td>',
'<td><b>' + _('paymentsystem_sum') + ': </b>{sum:this.renderMoney}</td>',
@sottwell
sottwell / Messages
Last active February 2, 2019 10:27
Dashboard Widget to display the number of internal Manager messages the user has - MODX Revoluition
// Dashboard widget to show number of Manager messages
$id = $modx->user->get('id');
$output = 'No messages.';
$total = $modx->getCount('modUserMessage',array(
'recipient' => $id,
));
if($total) {
$output = 'You have ' . $total . ' messages';
$unread = $modx->getCount('modUserMessage',array(
'recipient' => $id,