Skip to content

Instantly share code, notes, and snippets.

@petyosi
petyosi / app.module.ts
Last active August 30, 2022 08:29
crud-app-final
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {HttpModule} from '@angular/http';
import {FormsModule} from '@angular/forms';
import {AgGridModule} from 'ag-grid-angular';
import {AthleteService} from './services/athlete.service';
import {StaticDataService} from './services/static-data.service';
@petyosi
petyosi / ignore-resize-loop-error.js
Created February 8, 2022 15:33
Ignores error caused by nested resizing
window.addEventListener("error", (e) => {
if (
e.message ===
"ResizeObserver loop completed with undelivered notifications." ||
e.message === "ResizeObserver loop limit exceeded"
) {
e.stopImmediatePropagation();
}
});

Analyzing Behavior Driven Development Root Causes

If you’re not using it already, chances are it won’t work in your team.

How it All Started?

Hi there. I am Petyo, and I am into software. Recently, ruby and rails seem to be the weapon of choice. And them rails folks love to TAFT. A while ago, trying to blend into that brave community of ‘radicals’, I decided to give webrat with selenium for unit testing, in order to mitigate the constant slippery of client-side errors the project was experiencing.

As usually, one thing leads to another. Soon cucumber was in the game, and, before you know it, purchased the beta of the rspec book, reading about the strange and sometimes awkward syntax of my new tools.

// App.vue
<template>
<div id="app">
<div id="contentwrapper">
<div id="contentcolumn">
<div class="innertube">
<munro-detail :selectedMunro="selectedMunro"></munro-detail>
</div>
</div>
</div>
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {HttpModule} from '@angular/http';
import {FormsModule} from '@angular/forms';
import {AgGridModule} from 'ag-grid-angular';
import {AthleteService} from './services/athlete.service';
import {StaticDataService} from './services/static-data.service';
<app-grid></app-grid>
<div *ngFor="let athlete of athletes">
<span>{{athlete.id}}</span>
<span>{{athlete.name}}</span>
<span>{{athlete?.country?.name}}</span>
<span>{{athlete?.results?.length}}</span>
</div>
package com.aggrid.crudapp.controllers;
import com.aggrid.crudapp.model.Athlete;
import com.aggrid.crudapp.repositories.AthleteRepository;
import org.springframework.web.bind.annotation.*;
import java.util.Optional;
@RestController
public class AthleteController {
package com.aggrid.crudapp.bootstrap;
import com.aggrid.crudapp.model.Athlete;
import com.aggrid.crudapp.model.Country;
import com.aggrid.crudapp.model.Result;
import com.aggrid.crudapp.model.Sport;
import com.aggrid.crudapp.repositories.AthleteRepository;
import com.aggrid.crudapp.repositories.CountryRepository;
import com.aggrid.crudapp.repositories.SportRepository;
import org.springframework.context.ApplicationListener;
package com.aggrid.crudapp.repositories;
import com.aggrid.crudapp.model.Athlete;
import org.springframework.data.repository.CrudRepository;
public interface AthleteRepository extends CrudRepository<Athlete, Long> {
Athlete findByName(String name);
}