Skip to content

Instantly share code, notes, and snippets.

View ekas's full-sized avatar
😇
Loving it.

Ekas Preet Singh ekas

😇
Loving it.
  • Lufthansa Technik
  • Hamburg, Germany
  • 05:18 (UTC +02:00)
  • X @ekaspreet93
View GitHub Profile
@ekas
ekas / AES.c
Created October 26, 2016 04:36 — forked from bricef/AES.c
A simple example of using AES encryption in Java and C.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* MCrypt API available online:
* http://linux.die.net/man/3/mcrypt
*/
#include <mcrypt.h>
@ekas
ekas / Google ICS: Mobile Web, Course 2 Summary.md
Created March 2, 2018 16:04 — forked from gpalsingh/Google ICS: Mobile Web, Course 2 Summary.md
My notes on course on ES6. Not comprehensive.

Lesson 6: Syntax

  • let: Variables can be reassigned, but can’t be redeclared in the same scope.
  • const: Variables must be assigned an initial value, but can’t be redeclared in the same scope, and can’t be reassigned.
  • Hoisting: Before any JavaScript code is executed, all variables are hoisted, which means they're raised to the top of the function scope.
  • Temporal dead zone: If a variable is declared using let or const inside a block of code, then the variable is stuck in what is known as the temporal dead zone until the variable’s declaration is processed.
  • Suggested to ditch var in place of using let and const.
  • Template literals: Denoted with backticks ( `` ), template literals can contain placeholders which are represented using ${expression}.
  • Examples:

React Questions

1. Does create-react-app have any default css preproccesor included ? If No, which package provides the capability to have abc.scss files in the project.

  • A: sass-loader
  • B: node-scss
  • C: node-sass
  • D: Yes, it already has a Preprocessor
@ekas
ekas / ngIndia_Slides.md
Last active March 8, 2020 07:04
ngIndia 2020 - Speaker Decks & Notes
@ekas
ekas / learn_typescript.md
Last active December 8, 2022 02:14
Let's Gear Up for TypeScript

🚀 🚀 Let's Gear Up for TypeScript 🎉 🎉

TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. Any browser. Any host. Any OS. Open source.

Basic Types

  • Boolean
let isDone: boolean = false;
// Creating subarrays for input array given based on variable size k.
// Example: Input: [8, 2, 4, 20] & k=2 it should output to[[8, 2], [2, 4], [4, 20]]

const subArr = (arr, k) => {
  return arr.map((a, i) => {
    return arr.slice(i, k + i).length === k ? arr.slice(i, k + i) : '';
  }).filter((a) => a.length);
}
docker image dockerdev-enp.bin.cloud.barco.com/tfnnxt/system-manager-open-api:0.0.1-setup-NET0101-589-85e5dd9bb4-jenkins-10
docker image dockerdev-enp.bin.cloud.barco.com/tfnnxt/wall-space:0.0.0-ui-screen-work-flow-b3533838a9-jenkins-5
@ekas
ekas / node_nginx_ssl.md
Last active February 14, 2021 15:58 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@ekas
ekas / ImageLoad.js
Created August 26, 2020 17:32 — forked from nirajrajgor/ImageLoad.js
Progressive load image component in react with hooks
import React, { useState, useEffect } from 'react';
const ImageLoad = React.memo(({ src, placeholder, alt = "" }) => {
const [loading, setLoading] = useState(true);
const [currentSrc, updateSrc] = useState(placeholder);
useEffect(() => {
// start loading original image
const imageToLoad = new Image();
imageToLoad.src = src;

The Task

Since we want to keep this challenge rather less time consuming, we want you to create a small React app and display popular repositories of the week from Github. The user should have an opportunity to filter the repositories by the programming language of choice.

That would be nice to see some information about the repositories such as repository name, descriptions, etc.

Additional Info

  • Please have a look at Github documentation to find out the desired endpoint.
  • Feel free to experiment anything concerning the styles.