Skip to content

Instantly share code, notes, and snippets.

View asanikovich's full-sized avatar
🏠
Working from home

Aliaksei Sanikovich asanikovich

🏠
Working from home
View GitHub Profile
@sanchezzzhak
sanchezzzhak / clickhouse-get-tables-size.sql
Created January 18, 2018 13:43
clickhouse get tables size
SELECT table,
formatReadableSize(sum(bytes)) as size,
min(min_date) as min_date,
max(max_date) as max_date
FROM system.parts
WHERE active
GROUP BY table
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@preeteshjain
preeteshjain / .bash_profile
Created October 2, 2018 18:50
SMD Function
smd() {
if [ $1 = "a" ]
then
homestead up
cd /e/homestead_projects/project
subl .
explorer .
python -mwebbrowser "http://project.test"
python -mwebbrowser "http://phpmyadmin.test/db_structure.php?server=1&db=project_db"
npm run watch
@blackfyre
blackfyre / GeneralModal.vue
Last active April 3, 2025 21:40
Modals in Laravel Nova Tools
<template>
<modal @modal-close="handleClose">
<form
@submit.prevent="handleConfirm"
slot-scope="props"
class="bg-white rounded-lg shadow-lg overflow-hidden"
style="width: 460px"
>
<slot :uppercaseMode="uppercaseMode" :mode="mode">
<div class="p-8">
@bmaupin
bmaupin / free-database-hosting.md
Last active July 21, 2025 08:01
Free database hosting
@pmurzakov
pmurzakov / Badoo PHP Russia 2019 talk.md
Last active June 1, 2025 15:22
Badoo PHP performance -- useful links and snippets -- PHP Russia 2019 talk
@mpociot
mpociot / CanBeReplicated.php
Created June 12, 2019 12:32
Add the ability to replicate Laravel models to other models.
<?php
use Illuminate\Support\Arr;
trait CanBeReplicated
{
public function replicateTo(string $model, array $with = null, array $except = null)
{
$defaults = [
$this->getKeyName(),
@Harold2017
Harold2017 / go_cpu.md
Created June 25, 2019 04:48
golang cpu usage in docker

Golang CPU usage in docker

// test.go
package main

import (
	"fmt"
@pmurzakov
pmurzakov / Badoo PHP Meetup #3 2019 talk.md
Last active March 30, 2021 14:40
PHP shared nothing, preload, RoadRunner -- useful links and snippets -- Badoo PHP Meetup #3 2019 talk
@eddywm
eddywm / memo_checker.md
Last active March 31, 2023 14:30
ENABLING MEMO CHECKER

ENABLING MEMO CHECKER FOR AN ADDRESS

1. Install Binance-Chain Node CLI

sh <(wget -qO- https://raw.githubusercontent.com/onggunhao/node-binary/master/install.sh)

2. Add Wallet Phrase to the Node CLI

bnbcli keys add BEP2_WALLET --recover