Sorting algorithms
Sort an array of integers in descending order. Example: Given an array of 4 elements [3,15,1,5] Produce an array that ...
Simple caching using browser’s service workers.
A service worker API is relatively new technology, allowing for running a special type of web worker (a JavaScript), that ...
Simple use of Promises in JavaScript
Here is a simple and a bit silly example of using promises. In real life we could just move the ...
Selenium and PHP – Write a snapshot comparing tool
The Agenda This tutorial explains how to write a script that would tale a list of URLs, and create a ...
Maximum Subarray
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its ...
Adding Jest and Enzyme and creating snapshot tests
In this tutorial we will learn how to install Jest and Enzyme, and create Snaphot tests. If you are not ...
Setting up production server.
Developing config is adding a lot of heavy processing in order to have source mapping working and debugging easy, but ...
Adding environment variables file.
Although Wepack already comes with two modes: development and production, It comes handy to have different environment variables for development ...
Breaking the schema into separate group of files.
Having the entire schema into the server.js file is not practical, especially if the schema grows bigger, so let's move ...
Using GraphQLSchema to construct the schema programmatically.
For most of the cases defining a fixed schema when the application starts, by adding Query and Mutation types solely ...
Adding Middleware to log requested IPs
Middleware is a good way to pre-process the request before handing it out to GraphQL. We could add authentication that ...
Mutations and input types
Let's scrap our user greeting and make really useful schema, that will show up a dog breed catalog. We are ...
Object Types
In many cases returning a scalar values like Int or String might not be enough and we might want to return ...
GraphQL schemas, queries and resolvers.
In the previous example we learned how to run GraphQL with Express http server and we created a simple query ...
Adding Redux
In the previous tutorial we showed how to build custom Redux like store, which is a great way to understand ...
Max Consecutive Ones
Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 3 ...
Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: ...
Build Redux like custom store.
This exercise is a bit more challenging, that's why I will add two git branches: one with the middle of ...
Bundle splitting using react-loadable
So far we created one bundle that loads the code for all components, no matter if we are going to ...
Adding dynamic page layout loaded from GraphQL
Having page layout hardcoded works fine but it doesn't let us dynamically modify it without changing the code. What about ...
Listen for DOM changes using Mutation Observer
If we ever needed to listen for DOM events, one of the first options that comes to our mind might ...
Adding navigation in Single Page App
The concept of Single Page App is that all modules will be dynamically rendered while user navigates the page, without ...
Adding Apollo provider and introduction to making queries to GraphQL
Running GraphQL server to connect to. First let's have GraphQL server running so we could connect to. How to do ...
Adding routing
Set up Express server to route all requests to the default ./index.html
- For CLI instance this could be achieved ...
Three different ways to set up the project
So far we explored setting our project using Webpack Dev Server's Command line Interface (CLI) Let's explore the other two ...
Adding React Library, SASS, Images and font loaders
React is cool frontend library that updates only the necessary portions of the html. Let's add it to the project ...
Adding Webpack-dev-server
Ading Webpack-dev-server what is webpack-dev-server ? Like it was said "The webpack-dev-server is a little Node.js Express server, which uses the webpack-dev-middleware to serve a webpack bundle ...
Setting up SSL host using LetsEncrypt free certificate and set up auto renewal shell script.
1. Obtain SSL certificates from the letsencrypt.org ACME server.Navigate to the location that you would like to add the script ...
Median of Two Sorted Arrays
Task: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the ...
Linked Lists
Singly-linked list example implementation in Java Script Let's store these values from the diagram above in linked list. Using Object: ...
Passwordless SSH log in for MAC OS X
On the machine from you want to ssh to ypur dream server:
- Create id_rsa key.
Debugging SSH issues on OS X
Most common problems could be: Directory permissions directory permission permission code /Users/[usename] 755 rwxr-xr-x /Users/[usename]/.ssh 700 rwx------ /Users/[usename]/.ssh/id_rsa 600 rw------- ...
Running GraphQL with Express sever
Create the project with all dependencies. Create new node project -y will answer yes to all questions during setting up the ...
Server Side Rendering
The motivation: why doing it? Now we have a production build which works great, but when search engines look at ...
Longest Substring Without Repeating Characters
Task: Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 ...
Adding Config file and Babel loader
Why adding Babel ? Java Script is a language that evolves really fast, but unfortunately many people still use old ...
Webpack – Zero Config
Development vs Production modes. When you ran the code from the previous tutorial you might notice this message: WARNING in ...
Webpack – Getting Started
How to use this tutorial ? The table of contents of this tutorial is located on the right side There ...
Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each ...
Understanding Java Script Map, Filter and Reduce
The array // The array var people = [ { name: 'john', age: 24, weight: 84 }, { name: 'tim', ...
Two way communication between parent document and iFrame
This page is a simple demonstration of two way communication between iFrame and parent document even if they are hosted ...
Climbing stairs
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or ...
Multiple asynchronous http calls using curl
If you ever needed to fetch data from multiple sources on the backend, probably you already explored the benefits of ...
Synchronizing Filezilla site config between all devices.
If you use several computers at work and at home, sometimes becomes quite handy to be able to have all site ...
Brief Introduction to SWIFT types
Playground located at: https://github.com/ToniNichev/Swift-Data-Types
- Arrays
GIT bash cheatsheet
- Create repository from existing folder in github - open terminal and navigate to project's folder - initialize ...