Skip to content

Instantly share code, notes, and snippets.

View yeomann's full-sized avatar
Hard work yields success

Danish yeomann

Hard work yields success
View GitHub Profile
@yeomann
yeomann / docker-compose.yml
Created March 17, 2021 11:01 — forked from linuxsimba/docker-compose.yml
docker-compose for MongoDB and Mongoose UI
version: '2'
networks:
mongodb_net:
driver: bridge
ipam:
driver: default
config:
# Change this subnet range if it conflicts with your personal/work network
- subnet: 192.168.213.0/24
const { once, EventEmitter } = require('events');
const myEmitter = new EventEmitter();
let isJobCurrentlyRunning = false;
async function doAsyncJobsOneByOne(id) {
if (!isJobCurrentlyRunning) {
doJob(id);
} else {
await once(myEmitter, 'jobdone');

AWS Fargate Docker Simple Deployment Setup with SSL termination

How to:

  • create a Docker-based AWS Fargate/ECS deployment
  • without the Docker containers having a public IP
  • with an Application Load Balancer as reverse proxy / SSL termination proxy sitting in front of the containers

For Fargate/ECS to be able to access your Docker images hosted on ECR (or somewhere else) you'll have to allow outbound internet access to the Fargate subnets. Here's how you do it.

@yeomann
yeomann / react-terminology.md
Created July 26, 2020 16:16 — forked from sebmarkbage/react-terminology.md
React (Virtual) DOM Terminology
@yeomann
yeomann / react-terminology.md
Created July 26, 2020 16:16 — forked from sebmarkbage/react-terminology.md
React (Virtual) DOM Terminology
@yeomann
yeomann / countries.json
Created July 19, 2020 20:28 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@yeomann
yeomann / testing-postfix-linklist.cpp
Created May 19, 2019 19:11
testing-postfix-linklist
@yeomann
yeomann / assembly to compare 2 input number.asm
Last active May 10, 2019 14:43
assembly to compare 2 input number
.MODEL SMALL
.STACK 64
.DATA
MSG1 DB 13, 10, "Enter first number ", "$"
MSG2 DB 13, 10, "Enter second number ", "$"
MSG3 DB 13, 10, "You entered these 2 numbers ", "$"
MSGGreater DB 13, 10, "First Number is smaller", "$"
MSGEqual DB 13, 10, "Numbers are equal", "$"
MSGSecondGreater DB 13, 10, "Second Number is smaller", "$"
@yeomann
yeomann / assembly to add 2 numbers by input.asm
Last active May 10, 2019 14:34
assembly to add 2 numbers by input
.MODEL SMALL
.STACK 64
.DATA
MSG1 DB "Enter first number", 13, 10, "$"
MSG2 DB "Enter second number", 13, 10, "$"
MSG3 DB "You entered these 2 numbers", 13, 10, "$"
MSG4 DB "Result is", 13, 10, "$"
.CODE
mov ax,@DATA
mov ds,ax
@yeomann
yeomann / 0-model-override.js
Created March 6, 2019 15:34 — forked from spencermefford/0-model-override.js
An alternative to extending Loopback's built in models. In our application, we wanted to create a custom role called "ecm-administrator" that would have the ability to create and manage users.
module.exports = function (app) {
var _ = require('lodash');
var User = app.models.User;
var Role = app.models.Role;
var RoleMapping = app.models.RoleMapping;
var ACL = app.models.ACL;
/*
* Configure ACL's
*/