Skip to content

Instantly share code, notes, and snippets.

View valentininua's full-sized avatar
🇪🇸
🇮🇨 , 🇺🇦

Valentin Badiul S valentininua

🇪🇸
🇮🇨 , 🇺🇦
View GitHub Profile
@valentininua
valentininua / folder_structure.md
Created June 29, 2025 14:44 — forked from ayoubzulfiqar/folder_structure.md
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:

project-root/
    ├── cmd/
    │   ├── your-app-name/
    │   │   ├── main.go         # Application entry point
    │   │   └── ...             # Other application-specific files
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
<?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;
@valentininua
valentininua / navicat_reset_trial.sh
Created May 28, 2023 11:04
Reset Navicat Premium 15/16 remaining trial days
#!/bin/bash
set -e
file=$(defaults read /Applications/Navicat\ Premium.app/Contents/Info.plist)
regex="CFBundleShortVersionString = \"([^\.]+)"
[[ $file =~ $regex ]]
version=${BASH_REMATCH[1]}
@valentininua
valentininua / gist:a417433a8b35f3162201168170254a81
Created February 15, 2023 13:30 — forked from samsamm777/gist:7230159
PHP set private property value using reflection. This allows you to set a private property value from outside the object, great for PHPUnit testing.
<?php
$a = new A();
$reflection = new \ReflectionClass($a);
$property = $reflection->getProperty('privateProperty');
$property->setAccessible(true);
$property->setValue($a, 'new-value');
echo $a->getPrivateProperty();
//outputs:
@valentininua
valentininua / Example.php
Created January 20, 2023 00:16 — forked from vaibhavpandeyvpz/Example.php
Populate `created_at` and `updated_at` columns with Symfony & Doctrine.
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ExampleRepository")
* @ORM\HasLifecycleCallbacks()
* @ORM\Table("examples")
@valentininua
valentininua / git.md
Created August 29, 2022 19:11 — forked from GromNaN/git.md
My Git Commands

Initialize a repository without working directory

git init --bare --shared=0700

Undo last commit

git reset --hard HEAD~1

Review changes going to be committed