Skip to content

Instantly share code, notes, and snippets.

View cawa87's full-sized avatar
🤡
bip bip

Aleksandr Zamiatin cawa87

🤡
bip bip
View GitHub Profile
@cawa87
cawa87 / console.php
Created July 25, 2023 19:11
cosole graph
<?php
$data = [1.1066, 1.1048, 1.1023, 1.1003, 1.0969, 1.0951, 1.0901, 1.0914, 1.0867, 1.0842, 1.0835, 1.0816, 1.08,
1.079, 1.0801, 1.0818, 1.084, 1.0875, 1.0964, 1.0977, 1.1122, 1.1117, 1.1125, 1.1187, 1.1336, 1.1456,
1.139, 1.1336, 1.124, 1.1104, 1.1157, 1.0982, 1.0934, 1.0801, 1.0707, 1.0783, 1.0843, 1.0827, 1.0981,
1.0977, 1.1034, 1.0956, 1.0936, 1.0906, 1.0785, 1.0791, 1.0885, 1.0871, 1.0867, 1.0963];
$terminalWidth = 80;
$maxValue = max($data);
<?php
/** @noinspection PhpFullyQualifiedNameUsageInspection */
declare(strict_types=1);
namespace App\Domain\Service\Kyc;
abstract class AbstractServiceResult
{
@cawa87
cawa87 / TopfaceBot.py
Created November 24, 2020 07:34
Topface likes
from selenium import webdriver
from time import sleep
class TopfaceBot():
def __init__(self):
self.driver = webdriver.Chrome()
def login(self):
self.driver.get('https://topface.com')
login_btn = self.driver.find_element_by_xpath('/html/body/div[1]/div[1]/div[2]/div[5]/div[3]/button')
package main
import (
"fmt"
"github.com/streadway/amqp"
)
func main() {
fmt.Println(".")
<?php
namespace Ronte\TicketBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\SoftDeleteable\Traits\SoftDeleteable;
use Ronte\UserBundle\Entity\User;
package history
import (
"context"
"time"
"bitbucket.org/ronte/msg-go-history-messages/pkg/message"
"bitbucket.org/ronte/msg-go-history-messages/pkg/service/types"
"bitbucket.org/ronte/msg-gokit-packages/types/uuid"
)
@cawa87
cawa87 / ws.go
Created February 9, 2017 16:00
Websocket server
package main
import (
"github.com/googollee/go-socket.io"
"log"
"github.com/astaxie/goredis"
"net/http"
"regexp"
"os"
"encoding/json"
@cawa87
cawa87 / area.baner-platform.nginx
Created January 13, 2017 20:55
NGINX area.baner-platform.local
server {
listen 80;
# Multiple hostnames separated by spaces. Replace these as well.
server_name area.baner-platform.local; # Alternately: _
root /home/cawa/www/baner_platform/area/public;
index index.php;
add_header Access-Control-Allow-Origin *;
@cawa87
cawa87 / install.sh
Created September 25, 2016 10:23
install.sh
#!/usr/bin/env bash
echo 'Installing baner platform project...'
echo '------------------------------------'
read -p $'\e[1;32m
Enter database name: \e[0m ' dbname
read -p $'\e[1;32m
Enter database user name: \e[0m ' dbusername
@cawa87
cawa87 / APNS.php
Last active May 30, 2016 21:04
IOS\Android Push
<?php
namespace AppBundle\APNS;
use AppBundle\BasePush;
use Doctrine\Common\Persistence\ObjectManager;
/**
* Class APNS Класс отвечает за отправку сообщений (apple push notification service)
* @package AppBundle\APNS