Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
{"name":"groups","children":[{"name":"Arts & Culture","children":[{"name":"¡MEOW! A Character Design and Creative Writing Club","children":[[{"urlkey":"cartoonists","name":"Cartoonists","id":397},{"urlkey":"art","name":"Art","id":1502},{"urlkey":"animation","name":"Animation","id":1589},{"urlkey":"storytelling","name":"Storytelling","id":9429},{"urlkey":"fiction","name":"Fiction","id":15113},{"urlkey":"sketching","name":"Sketching","id":16783},{"urlkey":"motion-graphics","name":"Motion Graphics","id":19344},{"urlkey":"draw","name":"Drawing","id":20805},{"urlkey":"comic-artists","name":"Comic Artists","id":21260},{"urlkey":"3d-artists","name":"3D Artists","id":24147},{"urlkey":"character-design","name":"Character Design","id":24399},{"urlkey":"game-art","name":"Game Art","id":41897},{"urlkey":"graphics","name":"Graphics","id":66974},{"urlkey":"character-modeling","name":"Character Modeling","id":96042},{"urlkey":"character-animation","name":"Character Animation","id":1420132}]]},{"name":"Berlin Art Lovers","ch
This file has been truncated, but you can view the full file.
{"name":"groups","children":[{"name":"Arts & Culture","children":[{"name":"¡MEOW! A Character Design and Creative Writing Club","children":[[{"urlkey":"cartoonists","name":"Cartoonists","id":397},{"urlkey":"art","name":"Art","id":1502},{"urlkey":"animation","name":"Animation","id":1589},{"urlkey":"storytelling","name":"Storytelling","id":9429},{"urlkey":"fiction","name":"Fiction","id":15113},{"urlkey":"sketching","name":"Sketching","id":16783},{"urlkey":"motion-graphics","name":"Motion Graphics","id":19344},{"urlkey":"draw","name":"Drawing","id":20805},{"urlkey":"comic-artists","name":"Comic Artists","id":21260},{"urlkey":"3d-artists","name":"3D Artists","id":24147},{"urlkey":"character-design","name":"Character Design","id":24399},{"urlkey":"game-art","name":"Game Art","id":41897},{"urlkey":"graphics","name":"Graphics","id":66974},{"urlkey":"character-modeling","name":"Character Modeling","id":96042},{"urlkey":"character-animation","name":"Character Animation","id":1420132}]]},{"name":"Berlin Art Lovers","ch
@fdnklg
fdnklg / data.json
Last active January 11, 2019 23:00
I tried to add own data to this sketch: https://beta.observablehq.com/@mbostock/d3-horizon-chart#data
{"groups":[{"category":"fine arts/culture","values":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,3,3,4,4,4,4,6,6,6,7,7,7,8,8,8,10,11,11,12,12,13,15,15,15,16,16,17,19,20,23,25,28,29,30,36,37,38,38,43,45,50,53,56,59,60,64,68,71,76,79,85,90,94,100,103,110,115,120,124,128,128,128],"id":0},{"category":"book clubs","values":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,5,6,6,6,7,7,8,8,8,8,8,8,8,8,8,9,9,10,10,11,11,13,13,14,14,15,16,16,16],"id":1},{"category":"career/business","values":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,3,3,3,3,3,3,3,4,5,5,5,9,9,11,11,13,14,15,17,17,20,20,21,22,23,25,29,31,33,37,41,43,46,51,56,59,62,66,69,75,82,84,89,94,97,101,105,109,113,123,129,136,145,155,167,173,186,196,208,214,
<!DOCTYPE html>
<html>
<head>
<style>
svg {
display: block;
margin: 0 auto;
}
@fdnklg
fdnklg / ec2-mongodb-serverless-api.md
Last active August 14, 2019 14:05
Required steps and resources to setup a working restful api for a mongodb which is running on an aws ec2 instance.

How to setup a serverless rest api and connect it it with a mongodb on ec2 instance.

1. Setup an EC2 instance with terraform

Clone the Terraform example repo and follow the explained steps to get it running.

Be sure to open all necessary ports in your security groups used by the instance to make it available to the public.

1. Setup serverless on an aws with node.js

Follow the Tutorial to config serverless on your machine.

How to setup a geocoder api on your local computer

  1. Setup docker on your local machine and install Docker desktop

  2. Clone the nominitim-docker v3.0.0 repo:

git clone https://github.com/mediagis/nominatim-docker/tree/master/3.0
  1. Modify the Dockerfile and set your url to PBF

How to setup a docker container on an aws elastic beanstalk environment as a single node container

  1. prepare a docker image which runs locally. (You can find a docker image of the routing service here)
  2. setup aws account and create organization with required roles
    • elasticloadbalancing
    • aws-elasticbeanstalk-service-role
  3. Install EB-CLI (Command line interface) and AWS CLI
brew install awscli

If you’re interested to execute a script more often at a specific time you might be interested to setup a cron job. Now I want to briefly summarise the most basic how to about setting up a cronjob for a node script on a linux web server.

What is cron?

Cron is a service that executes scripts at a given time. Each cron job is following this syntax:

* * * * * auszuführender Befehl
┬ ┬ ┬ ┬ ┬
│ │ │ │ │
│ │ │ │ └──── weekday (0-7, Sonntag ist 0 oder 7)

How to request your rest API in a paginated way with parallel promises

  1. In your API backend count all documents included in your mongodb and create a handler function for it. A detailed view about the API code can be found here.
db.collection.find({ you db query here }).count()
  1. In the frontend split your requests in smaller bits of requests and while following this design pattern:

How to handle a sqlite database

A list a basic tutorials which helped to accomplish basic transformations of a sqlite db