Skip to content

Instantly share code, notes, and snippets.

View ashceo's full-sized avatar

Iv Po ashceo

View GitHub Profile
@ashceo
ashceo / install-liburing.sh
Created August 20, 2025 14:02 — forked from antonfirsov/install-liburing.sh
Patch Ubuntu 18.04 LTS for io_uring
mkdir liburing
pushd liburing
git clone https://github.com/axboe/liburing.git
pushd liburing
./configure
make
sudo make install
popd
@ashceo
ashceo / Clone Entity
Created January 21, 2025 21:50 — forked from danieledangeli/Clone Entity
Clone a doctrine entity
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Inflector\Inflector;
use Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
use Doctrine\ORM\Mapping\MappingException;
use Doctrine\ORM\PersistentCollection;
use Foodity\CoreBundle\Helper\EntityHelper;
@ashceo
ashceo / useModals.tsx
Created October 16, 2023 17:19 — forked from statico/useModals.tsx
Chakra UI await-able alert, confirm, and prompt modal dialogs
/*
* Usage:
* const { alert, confirm, prompt } = useModals()
* alert("Hey!") // awaitable too
* if (await confirm("Are you sure?")) ...
* const result = await prompt("Enter a URL", "http://")
*/
import React, {
createContext,