Skip to content

Instantly share code, notes, and snippets.

View akalongman's full-sized avatar
:octocat:
Loving Open Source

Avtandil Kikabidze akalongman

:octocat:
Loving Open Source
View GitHub Profile
private function generateRedirectUrl(Order $order): ?string
{
if (! $order->isPaymentTypeBank()) {
return null;
}
$requestUri = [
'lang_code' => config('project.payments.merchant.lang_code'),
'merch_id' => config('project.payments.merchant.merch_id'),
'o.order_id' => $order->getId(),
<?php
declare(strict_types=1);
namespace App\Http\Controllers\Api\V1;
use App\Models\Order;
use App\Services\OrdersService;
use App\Services\PurchaseService;
use Illuminate\Http\Request;
@akalongman
akalongman / Main.java
Created November 29, 2023 09:01
Parse PHP Serialized object in Java
import org.json.*;
public class Main {
public static void main(String[] args) {
String str = ";{\"uuid\":\"d1d06498-294d-430e-a7ca-b21a01e5a5dd\",\"displayName\":\"App\\\\Jobs\\\\SendSmsOneJob\",\"job\":\"Illuminate\\\\Queue\\\\CallQueuedHandler@call\",\"maxTries\":null,\"maxExceptions\":null,\"failOnTimeout\":false,\"backoff\":null,\"timeout\":null,\"retryUntil\":null,\"data\":{\"commandName\":\"App\\\\Jobs\\\\SendSmsOneJob\",\"command\":\"O:22:\\\"App\\\\Jobs\\\\SendSmsOneJob\\\":2:{s:4:\\\"data\\\";s:303:\\\"{\\\"subject\\\":\\\"Photocenter\\\",\\\"message\\\":\\\"ბოლო მესიჯი გამოგზავნილია 11:45\\\",\\\"phone\\\":\\\"995555555\\\",\\\"ignore_blacklist\\\":true,\\\"company_id\\\":115,\\\"type\\\":\\\"transactional_messages\\\",\\\"ip_address\\\":\\\"213.217.16.42\\\",\\\"uuid\\\":\\\"55021d6f-20ec-49db-9269-f51b7166b35d\\\",\\\"sms_type\\\":\\\"a2p\\\"}\\\";s:5:\\\"queue\\\";s:7:\\\"a2p_one\\\";}\"},\"sentry_baggage_data\":\"sentry-trace_id=03203501f21e4a829e635323149697c5,sentry-public_key=2f8
[Adblock Plus 2.0]
! Version:
! Title: GeoList
! Last modified:
! Expires: 4 days (update frequency)
! Homepage: https://longman.me/
! Licence: https://longman.me/licence.html
!
! Please report any unblocked adverts or problems
! in the gist (https://gist.github.com/akalongman/91b45a1f4871afdfa79d83b0e3d05d1b)
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="Project code style checker config">
<rule ref="../vendor/longman/php-code-style/longish.phpcs.xml">
</rule>
<!-- Ban some functions -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="sizeof" value="count"/>
body {
white-space: pre;
font-family: monospace;
background: black;
color: #cccccc;
}
.property {
font-weight: bold;
color: #F060F0;

Keybase proof

I hereby claim:

  • I am akalongman on github.
  • I am longman (https://keybase.io/longman) on keybase.
  • I have a public key whose fingerprint is 0D89 FDF5 A359 331A CA5B 86F9 9BAC 7D14 3BD2 A016

To claim this, I am signing this object:

@akalongman
akalongman / mysql-sync.sh
Created October 18, 2017 08:11
Sync one database to second using `pt-table-sync` + sync table structures as well
#!/bin/bash
# Fix for cron incorrect paths
HOME='/root'
# Sync database1 to database2
SRC_DB='database1'
DST_DB='database2'
EXCLUDE_TABLES=(table1 table2)
/* Userstyle for Gitlab.com. Created by: 2E0PGS */
/* Repository: https://bitbucket.org/2E0PGS/userstyles/overview */
/* Licence: GNU v3 */
/* Userstyle URL: todo /*
/* Version 1.0.7 01/02/2017 18:33*/
/* I suggest you set your Syntax Highlighting Theme to "Dark" under your /profile/preferences Page.*/
body, h1, h2, h3, h4, h5, h6, .wiki h1, .wiki h2, .wiki h3, .wiki h4, .wiki p, .wiki, .md-page, .blog-entry h1, .blog-entry h2, .blog-entry h3, .blog-entry h4, .blog-entry h5, .md-page h1, .md-page h2, .md-page h3, .md-page h4, .md-page h5, .blog-entry p, .md-page p, .detail-page-description .title, p, .cover-block .cover-title, .cover-block .cover-desc {
color: #ffffff !important;
@akalongman
akalongman / tasker
Last active April 28, 2016 09:46
Tasker - Bash alias runner for fast development
#!/usr/bin/env bash
# Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
PATH=$PATH:./node_modules/.bin
VERSION="1.1"
COLOR_RED=`tput setaf 1`
COLOR_GREEN=`tput setaf 2`
COLOR_BROWN=`tput setaf 3`
COLOR_RESET=`tput sgr0`