Skip to content

Instantly share code, notes, and snippets.

View RomanGorbatko's full-sized avatar
🎯
Focusing

Roman Gorbatko RomanGorbatko

🎯
Focusing
View GitHub Profile
@RomanGorbatko
RomanGorbatko / pgsql_backup.sh
Last active January 9, 2024 14:33
PostgreSQL daily backup and store to Digitalocean Spaces or Amazon S3
#!/bin/bash
BACKUP_DIR=/tmp/pg_backup
DAYS_TO_KEEP=2
FILE_SUFFIX=_pg_backup.sql
DATABASE=**database-name**
USER=**database-user**
SPACE=**bucket-name**
FILE=`date +%y%m%d-%H_%M_%S`${FILE_SUFFIX}
if 'Choose new_amount' in message.text:
max_amount = re.findall(regex, message.text, re.MULTILINE) # max amout frrom cornix bot
if max_amount[0][0]:
if float(max_amount[0][0]) > float(amount): # if cornix amount great then ui amount
client.send_message(chat_id=message.chat.id, text=amount) # set ui amoint
return
else:
client.send_message(chat_id=message.chat.id, text=max_amount[0][0]) # set cornix amount
return
<?php
/**
* aheadWorks Co.
*
* NOTICE OF LICENSE
*
* This source file is subject to the EULA
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://ecommerce.aheadworks.com/AW-LICENSE.txt
const express = require('express');
const bodyParser = require('body-parser');
// const moment = require('moment');
// const uuidv4 = require('uuid/v4');
const fs = require('fs');
const process = require('process');
const puppeteer = require('puppeteer');
const app = express();
import Debug from 'debug';
{
"data": [
{
"id": "1616191495261539",
"name": "Asia/Jerusalem",
"latitude": 31.347194673053,
"longitude": 34.964406665468
},
{
"id": "226632572",
<?php
namespace Madlexx\FOSUserBundle\EventListener;
use Madlexx\FOSUserBundle\Entity\User;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
<?php
namespace Madlexx\FOSUserBundle\Entity\Repository;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;
use Madlexx\FOSUserBundle\Entity\User;
class UserRepository extends EntityRepository
<?php
namespace Madlexx\FOSUserBundle\Controller;
use Madlexx\FOSUserBundle\Controller\Traits\SerializerTrait;
use Madlexx\FOSUserBundle\Entity\Direction;
use Madlexx\FOSUserBundle\Form\Type\DirectionFormType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
upstream phpfcgi {
server 127.0.0.1:9000;
# server unix:/var/run/php5-fpm.sock; #for PHP-FPM running on UNIX socket
}
server {
listen 80;
server_name procedure.zakupki-dev.online;
root /Users/rg/Devs/Sites/procedure/web/front;
<?php
class ApiFormHandler
{
/**
* @var FormFactory
*/
protected $formFactory;
/**