Skip to content

Instantly share code, notes, and snippets.

View imranismail's full-sized avatar

Imran Ismail imranismail

View GitHub Profile
@imranismail
imranismail / adaptive_web_app.js
Last active April 6, 2019 05:22
Adaptive Web Apps
import React from 'react';
import ReactDOM from 'react-dom';
import Service from './service';
const runApp = (App) =>
ReactDOM.render(<Service.Provider><App /></Service.Provider>, document.getElementById('root'))
import('ontouchstart' in window ? './mobile' : './desktop').then((app) => runApp(app))
@imranismail
imranismail / cluster.ex
Last active January 18, 2019 12:43
BEAM cluster formation in EC2
defmodule Cluster do
use GenServer
require Logger
import SweetXml, only: [sigil_x: 2]
def child_spec(_) do
Supervisor.Spec.worker(__MODULE__, [])
end
@imranismail
imranismail / BACKEND.md
Last active May 20, 2020 10:41
Careers at Fave

As a Back-End Engineer at Fave, you will help us design cutting edge scalable products to meet our rapidly growing business. We are looking for someone who cares a lot about their craft. Someone who understands the impact of their work on the users.

Your work is not limited to the end users. Your work impacts the livelihood of local businesses. With you, we can help them to grow their business.

As a Back-End Engineer, you will:

  • Develop back end code, Restful APIs and web applications
  • Perform peer code reviews to optimize code quality or readability
  • Deliver reliable solutions that handle massive data and high traffic.
  • Research & learn new technologies and work towards solving problems and meeting requirements.
@imranismail
imranismail / DEPLOYMENT.md
Last active August 7, 2018 16:59
Continuously Delivered Elixir Apps

Deployment

TODO(@imranismail)

@imranismail
imranismail / README.md
Last active July 20, 2018 07:30
Fullstack Interview Question

Problem

We are in need of a new search component to help our users discover our amazing deals. You are tasked to implement this feature.

This feature requires a single backend endpoint as well as the component that consumes it.

Please write your code in a git repository.

Ensure proper commit message through out the exercise so that we can understand your thought process.

const Tree = union('Tree', {
Leaf(value) {
return { value }
},
Node(value, ...children) {
return { value, children }
}
})
const HTML = union('HTML', {
@imranismail
imranismail / main.go
Last active June 10, 2018 12:27
main.go
package main
import (
"flag"
"fmt"
"log"
"encoding/json"
"github.com/valyala/fasthttp"
)
@imranismail
imranismail / API.js
Last active March 20, 2018 03:41
Proper Fetch Error Handling
import { union } from 'folktale';
export default class API {
static Exceptions = union('API.Exceptions', {
NetworkError(error) {
return { error };
},
ServiceError(code, message) {
return { code, message };
},
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.