Skip to content

Instantly share code, notes, and snippets.

@seniorcat
seniorcat / gist:cec99afee3db8d13fc70eb9bf1459783
Created May 15, 2025 07:20
Как удалить папку .idea из Git-репозитория
# Добавить в .gitignore
echo '.idea' >> .gitignore
# Удалить из индекса Git
git rm -r --cached .idea
# Зафиксировать изменения
git add .gitignore
git commit -m 'Удалил папку .idea из репозитория'
git push
@seniorcat
seniorcat / struct_benchmark_test.go
Created May 13, 2025 08:35
laschool struct benchmark test
package benchmark
import (
"testing"
)
type BadStruct struct {
A int64
B bool
C bool
@seniorcat
seniorcat / currencies.php
Last active May 23, 2024 11:33
PHP currency codes with name and symbol
<?php
$currencies = [
[
'code' => 'AFN',
'name' => 'Afghanistan Afghani',
'symbol' => '&#1547;'
],
[
'code' => 'ARS',
@seniorcat
seniorcat / services.yaml
Created September 5, 2023 11:26
symfony aws config without bucket in subdomain
Aws\S3\S3Client:
arguments:
- endpoint: '%env(AWS_ENDPOINT)%'
version: 'latest'
region: '%env(AWS_REGION)%'
use_path_style_endpoint: true
credentials:
key: '%env(AWS_KEY)%'
secret: '%env(AWS_SECRET)%'
@seniorcat
seniorcat / react-button-click-confirm.js
Last active August 31, 2023 11:14
react-button-click-confirm.js
<div className='delete-button' onClick={() => { if (window.confirm('Are you sure?')) this.onCancel(item) } } />
@seniorcat
seniorcat / countries.php
Created July 19, 2023 07:14
PHP country code ISO 3166-1 alpha-3 to name
$countries = [
'AFG' => 'Afghanistan',
'ALA' => 'Åland Islands',
'ALB' => 'Albania',
'DZA' => 'Algeria',
'ASM' => 'American Samoa',
'AND' => 'Andorra',
'AGO' => 'Angola',
'AIA' => 'Anguilla',
'ATA' => 'Antarctica',