Skip to content

Instantly share code, notes, and snippets.

View mihazs's full-sized avatar

Mihael Zamin Sousa mihazs

View GitHub Profile

How to start a new backend NodeJS + Typecript project

  1. Commit chore: configuring vscode

    • create an repository on the git.

    • create file .gitignore:

      node_modules

The Toy Robot Challenge

The application is a simulation of a toy robot moving on a square tabletop, of dimensions 5 units x 5 units. There are no other obstructions on the table surface. The robot is free to roam around the surface of the table. Any movement that would result in the robot falling from the table is prevented, however further valid movement commands are still allowed. The application reads a file using a name passed in the command line, the Ifollowing commands are valid:

PLACE X,Y,F
MOVE
LEFT
RIGHT
REPORT
version: "3"
services:
# configuration manager for NiFi
zookeeper:
hostname: myzookeeper
container_name: zookeeper_container_persistent
image: 'bitnami/zookeeper:3.7.0' # latest image as of 2021-11-09.
restart: on-failure
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
@liitfr
liitfr / README.md
Last active March 13, 2024 17:43
[how to revert 100644 → 100755 commits ?] #git #chmod

how to revert 100644 → 100755 commits

  • on your repo's root, run : find . -type f | xargs chmod -x
  • commit this change on files : commit -n -m 'fix: files permission from 100755 to 100644'
  • then with vim .git/config, set filemode option to false
[core]
        filemode = false
@ilyazub
ilyazub / puppeteer-reuse-cookie-in-http-request-from-node.js
Last active April 4, 2024 23:56
Reuse `puppeteer` cookies in `tough-cookie` and `got`
@rrag
rrag / README.md
Last active March 19, 2024 16:11
Yet another tutorial and Cheat sheet to Functional programming

There are many tutorials and articles available online which explain functional programming. Examples show small functions, which are composed into others which again get composed. It is hard to imagine how it would all work, then come the analogies and then the math. While the math is necessary to understand it can be difficult to grasp initially. The analogies on the other hand, (at least for me) are not relatable. Some articles assume the reader knows the different terminologies of FP. Over all I felt it is not inviting to learn.

This introduction is for those who have had a tough time understanding those analogies, taken the plunge to functional programming but still have not been able to swim. This is yet another tutorial on functional programming

Terminology

Functions as first class citizens

Functions are first class means they are just like anyone else, or rather they are not special, they behave the same as say primitives or strings or objects.