This script generates points inside a given geojson feature / polygon using turf.
You can use geojson for visualization or creating your own geojson by hand.
{ | |
"meta": { | |
"theme": "elegant" | |
}, | |
"basics": { | |
"name": "Yiğitcan UÇUM", | |
"label": "Staff Software Engineer", | |
"image": "https://www.gravatar.com/avatar/6900201177f2da2ec0fa993f04e0b851?s=400", | |
"summary": "An action-oriented hard worker. A wide range of experience with various programming languages and platforms. Specialized in high-scale backend development, cloud native technologies, and CI/CD environments.", | |
"website": "https://yigitcan.dev", |
This script generates points inside a given geojson feature / polygon using turf.
You can use geojson for visualization or creating your own geojson by hand.
BacklogItem is modeled two different ways. First one is the anemic model where we only have getters and setters on the BacklogItem. Making it pretty much the "domain" version of the database model we have in our minds.
The second one is a richer BacklogItem that has logic to uncommit / commit to a new sprint. E.g. All of the logics related to "committing to a sprint" are put into the BacklogItem's #commitTo. Creating high cohesion. BacklogItem emits an event after comitting to the sprint. This way other actors in the same/different bounded context can be notified of the changes.
Private/Protected methods + different #uncommitFrom are highlighted to show how they are helpful to implement #commitTo and other usecases.
"When a user is browsing the Catalog, Customer means one thing, but when a user is placing an Order, it means something else." Each domain expert things of something else.
const http = require("http"); | |
const https = require("https"); | |
function request(options) { | |
return new Promise((resolve, reject) => { | |
const { url, data, ...rest } = options; | |
const parsedURL = new URL(url); | |
const isHTTPS = parsedURL.protocol === "https:"; | |
const lib = isHTTPS ? https : http; |
export class ProductIntersectionRepository { | |
constructor(private readonly postgreSQLAdapter: PostgreSQLAdapter) | |
async getActiveAdvertisementProducts( | |
query: ProductIntersectionQuery | |
): Promise<AdvertisementWithProducts[]> | |
} | |
type ProductIntersectionQuery = { | |
sellerID: number; |
const postgreSQLAdapter: PostgreSQLAdapter = (global as any).postgreSQLAdapter; | |
const adRepository = new AdvertisementRepository(postgreSQLAdapter); | |
const repository = new ProductIntersectionRepository(postgreSQLAdapter); | |
describe('ProductIntersectionRepository', () => { | |
const UUID_PREFIX = 'f4f4c9e3-a077-4f3c-bf73-9c54cb57ffa'; | |
beforeEach(async () => { | |
await postgreSQLAdapter.query('DELETE FROM advertisements'); | |
await postgreSQLAdapter.query('DELETE FROM advertisement_products'); |
name: 'Lint and Tests' | |
on: push | |
jobs: | |
test: | |
name: Lint and Test Code Base | |
runs-on: ubuntu-latest | |
strategy: |
stages: | |
- test | |
integration-test: | |
extends: .node-cache | |
stage: test | |
image: node:14-alpine | |
services: | |
- name: docker:20.10.1-dind |
module.exports = { | |
postgre: { | |
image: 'postgres', | |
tag: '12.3-alpine', | |
ports: [5432], | |
env: { | |
POSTGRES_PASSWORD: 'integration-pass', | |
}, | |
wait: { | |
type: 'text', |