Skip to content

Instantly share code, notes, and snippets.

@BonBonSlick
BonBonSlick / ValueObject.php
Last active April 5, 2024 16:32
DateTime_$airAt
<?php
/*
* (c) BonBonSlick
*/
declare(strict_types=1);
namespace App\Domain\Core\ValueObjects\Time;
@BonBonSlick
BonBonSlick / checkAndRemoveSimilar.py
Created January 5, 2022 21:55
Multi threads async similar files removal
from PIL import Image
import random
import imagehash
import time
import os
import asyncio
import datetime
allowedFileFormats = '.jpg, .png, .webp, .mp4, .gif';
folderFailesPath = 'C:/Users/BonBon.DESKTOP-B1B9CUP/Downloads/files'
@BonBonSlick
BonBonSlick / check.py
Created January 3, 2022 22:25
Python check images for duplicates and remove
from PIL import Image
import imagehash
import time
import os
allowedFileFormats = '.jpg, .png, .webp, .mp4, .gif';
folderFailesPath = 'C:/Users/user/Downloads/test'
removedFilesForIteration = 0
numberofChecks = 0
totalRemovedFiles = 0
@BonBonSlick
BonBonSlick / upload_to_opensea.mmmacro
Created January 3, 2022 22:24
Mini Mouse Macro bulk upload of many items to opensea
1 | 2330 | 138 | 5000 | Left Click Down
2 | 2330 | 138 | 555 | Left Click Release
3 | 87 | 49 | 1500 | Left Click Down
4 | 87 | 49 | 555 | Left Click Release
5 | 1110 | 516 | 10000 | Left Click Down
6 | 1110 | 516 | 555 | Left Click Release
7 | 318 | 280 | 10000 | Left Click Down
@BonBonSlick
BonBonSlick / generator.php
Last active January 3, 2022 22:26
Simple domain name generator
// online generators do crap, you just use word like bank and generator adds
// random words to it producing smth like bank.toilet, bank-grass etc
// @todo
// 1 - add dictionaries for different lanugages eg japanese mimi = ear also could be a domain
// 2 - add maning and relevance filtering, eg music may have domain name like moza
// chopa, chopi, sonat etc relevant words see online
// this simple snippet generates better typing words
// of course there are many crap too, but you may find cool domains here
// if you remove substr($combination, -1) === $char check and increase length of output to 6,
// u will see that GOOGLE was generated and other simple to remember and type domains. But output file will be 3+ mil strings
@BonBonSlick
BonBonSlick / fav_movies
Created January 21, 2020 15:28
Use google translator for russian titles. This is my personal list of favorite movies. Which everyone should watch at least once.
1+1,
12 Monkeys,
12 Years a Slave,
127часов,
21,
1408,
2012,
300Спартанцев 1-2,
A Bronx Tale,
A Clockwork Orange,
@BonBonSlick
BonBonSlick / fav_movies
Created January 21, 2020 15:28
Use google translator for russian titles. This is my personal list of favorite movies. Which everyone should watch at least once.
1+1,
12 Monkeys,
12 Years a Slave,
127часов,
21,
1408,
2012,
300Спартанцев 1-2,
A Bronx Tale,
A Clockwork Orange,
@BonBonSlick
BonBonSlick / fav_movies
Created January 21, 2020 15:28
Use google translator for russian titles. This is my personal list of favorite movies. Which everyone should watch at least once.
1+1,
12 Monkeys,
12 Years a Slave,
127часов,
21,
1408,
2012,
300Спартанцев 1-2,
A Bronx Tale,
A Clockwork Orange,
@BonBonSlick
BonBonSlick / fav_movies
Created January 21, 2020 15:28
Use google translator for russian titles.
1+1,
12 Monkeys,
12 Years a Slave,
127часов,
21,
1408,
2012,
300Спартанцев 1-2,
A Bronx Tale,
A Clockwork Orange,
@BonBonSlick
BonBonSlick / CORSSubscriber.php
Last active July 31, 2019 00:15
CORSSubscriber
/**
* Class self
*/
final class CORSSubscriber implements EventSubscriberInterface{
/**
* @return array
*/
public static function getSubscribedEvents() : array {
return [