Skip to content

Instantly share code, notes, and snippets.

View 1ed's full-sized avatar

Gábor Egyed 1ed

  • Budapest, Hungary
  • 09:08 (UTC +02:00)
  • X @1edgbr
View GitHub Profile
@dbu
dbu / OAuthEsmtpTransportFactoryDecorator.php
Last active March 11, 2025 11:53
Send emails with Symfony Mailer through Outlook / office365 with OAuth
<?php
declare(strict_types=1);
namespace App\Infrastructure\Email;
use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\Smtp\Auth\AuthenticatorInterface;
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransportFactory;
@ghfields
ghfields / Ubuntu 19.10 zfs installer Encryption
Last active January 7, 2022 22:44
Fix Ubuntu 19.10 zfs installer /usr/share/ubiquity/zsys-setup (encryption)
1) Start in uefi mode.
At Line 216 use:
echo password | zpool create -f \
-o ashift=12 \
-O compression=lz4 \
-O acltype=posixacl \
-O xattr=sa \
-O relatime=on \
@mmalone
mmalone / example.sh
Created February 12, 2019 22:14
Using `step certificate` without the online step CA
# Create a root certificate and signing key.
$ step certificate create "Root CA" root.crt root.key --profile root-ca
Please enter the password to encrypt the private key:
Your certificate has been saved in root.crt.
Your private key has been saved in root.key.
# Create an intermediate certificate & signing key. This isn't
# required; we could use the root to sign directly which is
# probably fine for local dev and removes the need to bundle later.
$ step certificate create "Intermediate CA" int.crt int.key --profile intermediate-ca --ca root.crt --ca-key root.key
@hikari-no-yume
hikari-no-yume / example.php
Created March 20, 2017 20:02
function chaining for PHP 7
<?php declare(strict_types=1);
require_once "✨.🐘";
✨($_)->strlen("foo")->var_dump($_);
@paulirish
paulirish / what-forces-layout.md
Last active June 20, 2025 23:33
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@vi
vi / rust_wine.md
Last active May 20, 2024 23:46
Using Rust in Wine as a sort of cross-compiler

Cross-compiling Rust from Linux to Windows using Wine

🔴 Note: this article is obsolete. This cross-compilation direction may just work out of the box. 🔴

0. Ensure Rust works on Host

Let's create a dummy project for a test.

$ cargo new test
class MoneyType extends AbstractType implements DataMapperInterface
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('amount', 'integer')
->add('currency', 'string')
->setDataMapper($this)
;
}
@weaverryan
weaverryan / README.md
Last active April 28, 2020 14:07
Symfony Core Meeting Logs
Date Topics URL Summary
May 21st, 2015 core team organization, issue tagging/organization, PSR-7 logs --
June 4th, 2015 PSR-HttpFoundation, DI-PSR, issue triaging/organization, meeting organization logs --
June 18th, 2015 workflow/notifications, removing forums/ML, 3.0 changes - templating logs --
July 2nd, 2015 issues bot / HttpFoundation PSR-7 / dropping templating / new SE structure/ config component split / HttpKernel split logs summary
July 16th, 2015 issues bot / updates on initiatives / closing old issues logs --
July 30th, 2015 deprecatio
@ReneeVandervelde
ReneeVandervelde / topic-1-http-foundation.irclog
Created June 4, 2015 16:04
Symfony Dev Meeting 2015-06-04
[10:01] <weaverryan> Ok, let's get started! Thanks for coming everyone
[10:02] <romainneutron> thanks webmozart
[10:02] <weaverryan> Each topic will have 15 minutes and I'll try to keep us on time (more than 2 weeks ago)
[10:02] <weaverryan> Topics for today (one of them we may not need to discuss):
[10:02] <weaverryan> A) PSR and HttpFoundation planning (everyone)
[10:02] <weaverryan> B) (if needed) PSR DI response
[10:02] <weaverryan> C) Issue triaging and organization (we didn't get any real steps towards this last time)
[10:02] <weaverryan> D) Next meetings topics, meeting format, etc
[10:03] --> aitboudad (699da5dd@gateway/web/freenode/ip.105.157.165.221) has joined this channel.
[10:03] <weaverryan> Let's start the first topic - I don't have a "host" for that, but basically the idea is this: what is our plan with HttpFoundation and PSR-7. Should we move *towards* it?
@Athari
Athari / output
Last active February 27, 2016 22:15
LINQ for PHP comparison: YaLinqo vs Ginq vs Pinq performance (see https://github.com/Athari/YaLinqoPerf)
Iterating over 1000 ints
------------------------
PHP [for] 0.00006 sec x1.0 (100%)
PHP [array functions] 0.00011 sec x1.8 (+83%)
YaLinqo 0.00022 sec x3.7 (+267%)
Ginq 0.00077 sec x12.8 (+1183%)
Pinq 0.00040 sec x6.7 (+567%)
Generating array of 1000 integers
---------------------------------