Skip to content

Instantly share code, notes, and snippets.

@mehradsadeghi
mehradsadeghi / main.go
Created December 9, 2024 11:10
Estimate Map Size in Go
func estimateMapSize(m map[string]bool) uintptr {
var totalSize uintptr
ch := make(chan uintptr)
wg := sync.WaitGroup{}
// Iterate over each key-value pair
for key, value := range m {
wg.Add(1)
go func() {
defer wg.Done()
<?php
use RecursiveArrayIterator;
use RecursiveIteratorIterator;
use ReflectionClass;
class Extractor {
public static function get_controllers_and_methods_list($path = 'Controllers/') {
version: "3"
services:
mysql:
restart: always
container_name: mysql-test
image: mysql:5.7
volumes:
- /if-you-need-to-mount:/target
environment: