Software Engineer

Let’s provide axios as a Lambda layer

Prerequisites

  • AWS account
  • npm
  • zip
mkdir nodejs
cd nodejs
npm install axios
cd ..
zip -r axios.zip nodejs
Image for post
Image for post
Create new layer


Let’s combine everything together Node.js, MySQL, AWS EC2, Express, env, Docker Compose, GitHub

Image for post
Image for post

Few days ago I’ve helped out my friend to deploy Node.js application to AWS EC2. Now I’ll show you, how I did it.

Create new Node.js app

Let’s init new Node.js application and install express as a dependency.

# Install GitHub CLI
brew install gh
# Create private repo
gh repo create sample-app --private -y
cd sample-app
npm init -y
npm i express
touch index.js
echo "node_modules" >> .gitignore

Let’s add “Hello, World” response and start the server in index.js.

const express = require("express");const app = express();
const port =…


Prepare your Mac for coding using this script

Image for post
Image for post

I’ve written this script…

You can run it using:

curl https://gist.githubusercontent.com/ljmocic/a72983b0d39632c9f88e62cc6bdc0c9f/raw/f8404920d71b8424c2d238bd33f93ffa068e38ee/mac-setup.sh|sh

But let’s see what I’ve added there…

What’s inside

The essential thing is the package manager Homebrew. It enables us to install so many useful tools without having to install every thing separately. But there’s many more stuff included:

Runtimes

It’s easy to customize this script and you can find many more Homebrew formulas to add. …


Replace your RSS reader with simple Telegram bot

Image for post
Image for post

Recently I’ve got order on Fiverr to create Telegram bot which would notify public channel with new job postings in Singapore.

The data from the website was available through RSS feed. The bot should check every 20 minutes for a new content.

It was very simple to create it, so I want to share with you, how I did it.

Prerequisites

So let’s get started

Create bot

  1. Message @BotFather in Telegram
  2. Enter /start command
  3. Add all of the info it requests
  4. Save the token in the end
  5. Create public channel
  6. Add bot to that…


Send an email as simple as possible

Image for post
Image for post

I’ve written a simple script for sending emails with just Python and Gmail account about year ago, but in a meantime, it stopped working. I discovered that different credentials are needed now in order to send mail via script.

So I wrote this short guide to explain which configuration is required now and how to make it work again.

Prerequisites

  1. Enable 2-step verification
  2. Generate app password


React is lightweight, S3 is cheap, GitHub Actions make deployment easier. Why don’t we try to use them together?

Image for post
Image for post

Why?

React became dominant in frontend development and it became first choice library for front-end development.

S3 is actually very cheap.

GitHub Actions abstract away a lot of complexity inside CI/CD workflows and they give us a chance to create easily understandable workflows faster.

Prerequisites

What we will need to make this work:

Let’s get started

npx create-react-app react-github-actions
gh repo create react-github-actions

NOTE: It will ask you if you want to create local project directory, say yes. …


Don’t integrate a full IoT solution if you just want to control one lamp.

Why?

My previous lamp stopped working. So I replaced it with the small strip of LEDs which connect over USB and works non-stop when connected.

I wanted to control turning it on/off with the button.

I’ve looked for some prebuilt solutions, but everything I found was too complicated for this use-case, so I came up with some simple solution.

Solution:

  1. Connect LED strip to Raspberry Pi USB port and control the powering of the USB port via SSH.

2. Create a Siri Shortcut action for turning it on and off. …


Image for post
Image for post

While there are many factors to be included for deciding on which company has the greatest potential, in this article I will pick the ones which description seems most interesting to me.

What’s Y Combinator?

Y Combinator is a startup accelerator that helped to launch more than 2,000 companies including Stripe, Airbnb, Cruise Automation, DoorDash, Coinbase, Instacart, and Dropbox.

Every year they invest a small amount of money in a large number of companies.

They have summer and winter season and they’ve published descriptions of the companies from the Winter 2020 season, originally on TechCrunch.

Top 7 Startups from W20

I’ve picked 7 most interesting ones and briefly explained why they are interesting to…


Use the power of EC2 instance to execute a resource-hungry script

Image for post
Image for post
S3 + EC2

Problem

The other day I was approached by a client who had a 2011 MacBook Air. He was trying to execute some computationally intensive script which only required Python to be installed. His script took longer than 30 minutes to execute on his machine.

He wanted to place his script in S3 bucket and simply execute it in the cloud without worrying about anything else.

Solution

The first solution that came to me was the usage of AWS Lambda. But Lambda execution time limit was 5 minutes. …

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store