Skip to content

Instantly share code, notes, and snippets.

@jgardezi
jgardezi / stack.yaml
Created February 21, 2022 04:30 — forked from asishrs/stack.yaml
AWSTemplateFormatVersion: '2010-09-09'
Description: AWS API Gateway with a Lambda Integration
Parameters:
lambdaFunctionName:
Type: "String"
AllowedPattern: "^[a-zA-Z0-9]+[a-zA-Z0-9-]+[a-zA-Z0-9]+$"
Description: Lambda function name. (Recommend to keep default)
Default: "lambda-api"
@jgardezi
jgardezi / Senior FE NFQ.md
Created May 2, 2019 04:15 — forked from hoanglamhuynh/Senior FE NFQ.md
This test requires the candidate to work with React, Redux (or similar), HTML API (Location API) and third-party DOM API (Google Map). It also test the candidate's ability to work with remote data source (Google Firebase) as well as deploying application (Heroku, etc..). Nice-looking UI and good code structure is MANDATORY

1. Write an application in React JS:

Must use Redux or any state management libraries

  • Displays a list of Address in Vietnam. Each Address consists of street name, ward, district, city, country....
Street Name Ward District City Country
72 Le Thanh Ton Ben Nghe ward District 1 Ho Chi Minh city Vietnam
138 Hai Ba Trung Da Kao ward District 1 Ho Chi Minh city Vietnam
... ... ... ... ...
@jgardezi
jgardezi / Dockerfile
Last active July 20, 2018 04:19
ci-container
# Use an official Nodejs runtime as a parent image
FROM node:8.11.3
MAINTAINER Javed Gardezi <s.m.j.k.g@hotmail.com>
RUN apt-get update && \
apt-get install -y python-dev python-pip
RUN pip install --upgrade pip
RUN pip install --upgrade awscli
@jgardezi
jgardezi / bitbucket-pipelines.yml
Created May 11, 2018 07:07 — forked from tstrohmeier/bitbucket-pipelines.yml
AWS ECS: Script for creating a new revision of a task definition and update a service
# enable Docker for your repository
options:
docker: true
pipelines:
branches:
development:
- step:
# python image with aws-cli installed
@jgardezi
jgardezi / remote react bootstrap table example
Created January 28, 2018 22:28 — forked from xabikos/remote react bootstrap table example
An example of a react bootstrap table that fetches the data asynchronously when navigating between pages and when changing the page size
import React, {Component} from 'react';
import {BootstrapTable, TableHeaderColumn} from 'react-bootstrap-table';
import _ from 'lodash';
const dataTable = _.range(1, 60).map(x => ({id: x, name: `Name ${x}`, surname: `Surname ${x}`}));
// Simulates the call to the server to get the data
const fakeDataFetcher = {
fetch(page, size) {
return new Promise((resolve, reject) => {
@jgardezi
jgardezi / BaseModel.php
Created August 31, 2017 00:53 — forked from JeffreyWay/BaseModel.php
To make for clean and readable tests, do your mocking in a base model that your Eloquent models extend.
<?php
class BaseModel extends Eloquent {
public static function shouldReceive()
{
$repo = get_called_class() . 'RepositoryInterface';
$mock = Mockery::mock($repo);
App::instance($repo, $mock);