profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/kevinsimper/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Kevin Simper kevinsimper Blackbeard Copenhagen, Denmark https://www.kevinsimper.dk Working on electric car sharing at @greenmobility

chklueter/code-of-conduct 1

Code of conduct for HackYourFuture Copenhagen

HackYourFuture-CPH/teaching-instructions 1

Step-by-step guide for new (and old) teachers

kevinsimper/berglas 1

A tool for managing secrets on Google Cloud

copenhagenjs/meetup-slides 0

The welcome presentations from each month meetups.

inga-balcune/countries-of-the-world 0

Countries of the World is my first serious front end web development project and first repository on Github

kevinsimper/aenea 0

Client-server library for using voice macros from Dragon NaturallySpeaking and Dragonfly on remote/non-windows hosts.

kevinsimper/akasse 0

Info om akasser

issue commentTurfjs/turf

Truncate and simplify generates Error: invalid polygon

Hi @JamesLMilner

Thank you for your answer! I follow your point and your arguments are correct.

Some more details, the polygon comes from another format, which again come from another format. It start as a KML file made in Google Earth, uploaded to a service that stores it not in geojson, then I convert it to geojson.

The suprise is just that Turfjs generates geojson that it does not accept itself.

The truncate precision 4 was also meant for a zone that was 20 square kilometers, so that it ran on a polygon that was only couple of square meters was not the primary goal for turf.simplify(turf.truncate)

Wrapping with try/catch will not work since I run it on a turf.featureCollection

Here is a zone that has been truncate percision four and simplify

{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[12.5902,55.7128],[12.5842,55.7226],[12.5903,55.7257],[12.5818,55.7314],[12.5856,55.7464],[12.6026,55.7591],[12.5905,55.7783],[12.5733,55.7706],[12.5017,55.7652],[12.493,55.7429],[12.4743,55.7382],[12.5014,55.7304],[12.4999,55.7242],[12.5098,55.7202],[12.4805,55.7059],[12.4869,55.6733],[12.5085,55.6612],[12.4997,55.6604],[12.5012,55.6546],[12.5197,55.6527],[12.5195,55.6615],[12.5317,55.6611],[12.5447,55.6434],[12.5831,55.6385],[12.5805,55.6321],[12.5877,55.6284],[12.6023,55.6312],[12.5997,55.6379],[12.649,55.6465],[12.6256,55.6841],[12.6003,55.6893],[12.606,55.7078],[12.5902,55.7128]]]}}]}

http://geojson.io/

kevinsimper

comment created time in 2 days

issue openedTurfjs/turf

Truncate and simplify generates Error: invalid polygon

Latest turfjs version, location: /@turf/turf@6.5.0/turf.min.js

Code for reproducing:

const polygon = JSON.parse('{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[12.56231543067888,55.71174271303183],[12.5622924993585,55.7117097183066],[12.56245909105533,55.71165693489258],[12.56248995363732,55.71168436284357],[12.56231543067888,55.71174271303183]]]}}')
turf.truncate(polygon)
turf.simplify(turf.truncate(polygon, { precision: 4 }))

Error generated:

turf.min.js:43 Uncaught Error: invalid polygon
    at en (turf.min.js:43)
    at turf.min.js:43
    at Array.forEach (<anonymous>)
    at tn (turf.min.js:43)
    at turf.min.js:88
    at turf.min.js:88
    at q (turf.min.js:1)
    at Object.t.simplify (turf.min.js:88)
    at <anonymous>:3:6

After debugging, it is the simplify function that removes duplicates, and thus ends up with a polygon that is not a polygon anymore.

created time in 2 days

issue commentprisma/prisma

Run a migration by hand and update the migration table manually

@janpio Yes correct!

kevinsimper

comment created time in 4 days

issue commentprisma/prisma

Run a migration by hand and update the migration table manually

What does "should be done concurrently" mean?

If you add a index to a tabel it will lock writes to it. Postgres supports writing a index CONCURRENTLY. It takes longer, but does not lock the table. https://www.postgresql.org/docs/9.1/sql-createindex.html

a standard index build locks out writes (but not reads) on the table until it's done.

But a index CONCURRENTLY can not be added in a transaction block.

Adding a column to a table with milions of rows took for me 5 mins adding it concurrently. Adding it without concurrent would have been quicker, but I did not want not to write to the tables at the same time.

kevinsimper

comment created time in 5 days

push eventkevinsimper/kevinsimper.dk

Kevin Simper

commit sha ba098f415ae2496fbf4ae6cdcdb6c377d2ea2b22

Linearly hard

view details

push time in 5 days

push eventkevinsimper/kevinsimper.dk

Kevin Simper

commit sha 82ed8ffcc638fe84c36da33b30d5069182b67940

Include components in tailwind analyse

view details

push time in 5 days

push eventkevinsimper/kevinsimper.dk

Kevin Simper

commit sha 5e0134796636b14d8037b83d4eb58b5af6d9c45f

Implement better menu

view details

push time in 5 days

push eventkevinsimper/kevinsimper.dk

Kevin Simper

commit sha 4ef73d2c7cdb0f4fa18fc1ef650c1009481e6420

Remove old server and pages

view details

push time in 5 days

push eventkevinsimper/findbehandler

Kevin Simper

commit sha 0399a3e07eb8ff9ec8259b89d8466a8d9807c554

Create README.md

view details

push time in 6 days

create barnchkevinsimper/findbehandler

branch : master

created branch time in 6 days

created repositorykevinsimper/findbehandler

created time in 6 days

push eventkevinsimper/monorepo-nodejs

Kevin Simper

commit sha 28bc8c28cdb39cd99df881f1a6854dfa312ad2cf

Create README.md

view details

push time in 6 days

create barnchkevinsimper/monorepo-nodejs

branch : master

created branch time in 6 days

created repositorykevinsimper/monorepo-nodejs

created time in 6 days

issue openedgooglemaps/js-three

Example of box staying the same size regardless of zoom like original Marker

The google.maps.marker stays the same size regardless of how zoomed in or out the map is.

How can the same effect be archived?

Add a box or gltf can become invisible if the users is zoomed to far our or in.

created time in 6 days

issue commentgooglemaps/js-three

Combining with google.maps.Polygon

@jpoehnelt Thank you!

I have created it here: https://issuetracker.google.com/issues/200065975

kevinsimper

comment created time in 10 days

issue openedgooglemaps/js-three

Combining with google.maps.Polygon

When I combined the use of ThreeJSOverlayView, just following the basic tutorials, it appears like the Overlay that google.maps.Polygon is drawn is messed with.

You can see the overlay does not follow the map 2021-09-16 02 46 34

and the code to add the gltf is the example:

const scene = new Scene();
      const ambientLight = new AmbientLight(0xffffff, 0.75);

      scene.add(ambientLight);

      const directionalLight = new DirectionalLight(0xffffff, 0.25);

      directionalLight.position.set(0, 10, 50);
      scene.add(directionalLight);

      const center = map.getCenter();
      if (!center) return;
      new ThreeJSOverlayView({
        map,
        scene,
      });

      const loader = new GLTFLoader();
      const url =
        "https://raw.githubusercontent.com/googlemaps/js-samples/master/assets/pin.gltf";

      loader.load(url, (gltf) => {
        gltf.scene.scale.set(100, 100, 100);
        gltf.scene.position.copy(
          latLngToVector3({ lat: 55.6832338, lng: 12.5819998 })
        );
        gltf.scene.position.setY(500);
        gltf.scene.rotation.x = Math.PI / 2;
        scene.add(gltf.scene);
        console.log(gltf);
      });

If new ThreeJSOverlayView({ map, scene, }); is commented out, then the problem disappears

2021-09-16 02 48 56

created time in 10 days

delete branch kevinsimper/kevinsimper.dk

delete branch : fixerror

delete time in 12 days

push eventkevinsimper/kevinsimper.dk

Kevin Simper

commit sha 8d30b54f05870b597ce5305db1eec7d292098137

Update to node 16 and fix mdx error

view details

Kevin Simper

commit sha a109959372861efa661d7294430fdb231623a407

Merge pull request #156 from kevinsimper/fixerror Update to node 16 and fix mdx error

view details

push time in 12 days

push eventkevinsimper/kevinsimper.dk

Kevin Simper

commit sha 8d30b54f05870b597ce5305db1eec7d292098137

Update to node 16 and fix mdx error

view details

push time in 12 days

create barnchkevinsimper/kevinsimper.dk

branch : fixerror

created branch time in 12 days

issue openedprisma/prisma

Run a migration by hand and update the migration table manually

Problem

Adding indexes should be done concurrently in postgres

Prisma generates indexes in the migration.

Indexes concurrently can't be added in a transaction

I run the migration manually by hand and comment out the add indexes while running prisma migrate deploy

Afterwards Prisma deploy will say

WARNING The following migrations have been modified since they were applied:

Suggested solution

One solution could be:

Output the checksum so that I can update it manually

created time in 19 days

push eventkevinsimper/kevinsimper.dk

Kevin Simper

commit sha e287966652478acd8d02d505359d05aa468b5bc8

Add back autopre

view details

push time in 20 days

push eventkevinsimper/kevinsimper.dk

Kevin Simper

commit sha da648ee2b260ebbddeae6e8db19433c9809a2d36

Update to latest mdx remote

view details

push time in 20 days

delete branch kevinsimper/kevinsimper.dk

delete branch : newlock

delete time in 20 days

push eventkevinsimper/kevinsimper.dk

Kevin Simper

commit sha 3fba195615f14ab0b384926b74e5d0423a7f26d1

New lockfile v2

view details

Kevin Simper

commit sha 1badca0dfd251f6fadd6f0025588128d6ce7975c

Merge pull request #155 from kevinsimper/newlock

view details

push time in 20 days

PR merged kevinsimper/kevinsimper.dk

New lockfile v2
+10073 -4147

0 comment

1 changed file

kevinsimper

pr closed time in 20 days

PR opened kevinsimper/kevinsimper.dk

New lockfile v2
+10073 -4147

0 comment

1 changed file

pr created time in 20 days