This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type MethodKeys<T> = ({ [P in keyof T]: T[P] extends Function ? P : never })[keyof T]; | |
type ClassProps<T> = { | |
[key in keyof T]: | |
T[key] extends { value: any } | |
? Pick<T[key], "value">["value"] | |
: T[key] extends Object | |
? ValueObjectPrimitives<T[key]> | |
: T[key]; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// 👍 Videos folder in grid view (with video duration) | |
const videosInGridView = Array.from(document.querySelectorAll(".sc-jWBwVP")).reverse(); | |
const videoSummaries = videosInGridView.map(function (video) { | |
const videoLink = video.querySelector("h4 > a"); | |
const videoTitle = videoLink.getAttribute("title"); | |
const videoUrl = 'https://vimeo.com' + videoLink.getAttribute("href").replace('/settings', ''); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types = 1); | |
// ****************************************************** | |
// ****************************************************** | |
// 💩🔴✋ HERENCIA ✋🔴💩 | |
// ****************************************************** | |
// ****************************************************** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###> Docker Compose - DB ### | |
MYSQL_DATABASE=symfony | |
MYSQL_USER=codely | |
MYSQL_PASSWORD=c0d3ly | |
###< Docker Compose - DB ### | |
# In all environments, the following files are loaded if they exist, | |
# the later taking precedence over the former: | |
# | |
# * .env contains default values for the environment variables needed by the app | |
# * .env.local uncommitted file with local overrides |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Command; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use App\Domain\LogEntry; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "unique-name/kata-name", | |
"description": "Kata description", | |
"type": "project", | |
"license": "proprietary", | |
"require": { | |
"php": "^7.3" | |
}, | |
"require-dev": { | |
"symfony/var-dumper": "^4.2", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class GildedRose { | |
public static function updateQuality( | |
$items | |
) { | |
for ($i = 0; $i < count($items); $i++) { | |
if (("Aged Brie" != $items[$i]->getName()) && ("Backstage passes to a TAFKAL80ETC concert" != $items[$i]->getName())) { | |
if ($items[$i]->getQuality() > 0) { | |
if ("Sulfuras, Hand of Ragnaros" != $items[$i]->getName()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace CodelyTv\Context\Meetup\Module\Video\Domain\Create; | |
use CodelyTv\Context\Meetup\Module\Video\Domain\VideoId; | |
use CodelyTv\Context\Meetup\Module\Video\Domain\VideoTitle; | |
use CodelyTv\Context\Meetup\Module\Video\Domain\VideoUrl; | |
use CodelyTv\Shared\Domain\CourseId; | |
final class CreateVideoCommandHandler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Full repo: https://github.com/CodelyTV/scala-intro-examples/ | |
package tv.codely.scala_intro_examples.lesson_09_oop | |
import org.scalatest.{Matchers, WordSpec} | |
final class CaseClassVisibilitiesSpec extends WordSpec with Matchers { | |
private val randomText = "some text" | |
private val caseClass = CaseClass(attributeInConstruct = randomText) | |
"Case Class" should { |
NewerOlder