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 / WordPress Shortcode with ob_start()
Created August 15, 2016 20:47 — forked from azizultex/WordPress Shortcode with ob_start()
WordPress Shortcode with ob_start()
function custom_query_shortcode($atts) {
// EXAMPLE USAGE:
// [loop the_query="showposts=100&post_type=page&post_parent=453"]
// Defaults
extract(shortcode_atts(array(
"the_query" => ''
), $atts));
@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