Skip to content

Instantly share code, notes, and snippets.

View Yogendra0Sharma's full-sized avatar
🎯
Focusing

Yogendra Sharma Yogendra0Sharma

🎯
Focusing
  • Intelizign Engineering Service GmbH, Ex- Siemens Digital Industries Software
  • Nuremberg, Germany
  • X @Fuzzbaba
View GitHub Profile
@Yogendra0Sharma
Yogendra0Sharma / a_mongodb_to_s3_backup.sh
Created January 29, 2018 09:03 — forked from gauravmehla/a_mongodb_to_s3_backup.sh
MongoDB Automatic Backup to Amazon S3 with Crontab and s3cmd. Red Hat Linux on Amazon EC2
#!/bin/bash
#Force file syncronization and lock writes
mongo admin --eval "printjson(db.fsyncLock())"
MONGODUMP_PATH="/usr/bin/mongodump"
MONGO_HOST="prod.example.com"
MONGO_PORT="27017"
MONGO_DATABASE="dbname"
@Yogendra0Sharma
Yogendra0Sharma / better-nodejs-require-paths.md
Created January 29, 2018 09:03 — forked from gauravmehla/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@Yogendra0Sharma
Yogendra0Sharma / memory_layout.md
Created January 29, 2018 08:58 — forked from rhamaa/memory_layout.md
Linux: Understanding the Memory Layout of Linux Executables

Understanding the Memory Layout of Linux Executables

Required tools for playing around with memory:

  • hexdump
  • objdump
  • readelf
  • xxd
  • gcore
@Yogendra0Sharma
Yogendra0Sharma / Deploy.md
Created January 29, 2018 08:54 — forked from alfonsogarciacaro/Deploy.md
Deploying an F# ASP.NET Core app (Giraffe) to Azure

Deploying an F# ASP.NET Core app to Azure

Last week I spent a lot of time trying to deploy an F# ASP.NET Core app (a Giraffe app, specifically) to Azure because the information to complete all the steps was scattered in several places. So I'm writing this hopefully it will save the pain to others :)

Preparation

The following steps are mostly taken from this guide and it's only necessary to do them once:

  1. Create an account in Azure (or use an existing one)
  2. Create a resource group (or use an existing one)
@Yogendra0Sharma
Yogendra0Sharma / alias.bat
Created January 29, 2018 08:41 — forked from jcalano/alias.bat
Simple, but useful aliases; this can be done other means--of course--but this is dead simp works on EVERY Windows machine on the planet.
;= @echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto end
;= rem ******************************************************************
;= rem * Filename: aliases.bat
;= rem * Version: 1.0
;= rem * Author: Ben Burnett <me@cs.wisc.edu>
;= rem * Purpose: Simple, but useful aliases; this can be done by

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@Yogendra0Sharma
Yogendra0Sharma / ec2_auto_stop_start.py
Created January 19, 2018 05:04 — forked from srs81/ec2_auto_stop_start.py
Python: Auto start and stop EC2 instances at certain times of the day
#!/usr/bin/python
#
# Auto-start and stop EC2 instances
#
import boto, datetime, sys
from time import gmtime, strftime, sleep
# AWS credentials
aws_key = "AKIAxxx"
aws_secret = "abcd"
@Yogendra0Sharma
Yogendra0Sharma / teamcity-agent-ubuntu.md
Created October 27, 2017 11:48 — forked from knope/teamcity-agent-ubuntu.md
Instructions to Setup Teamcity Agent on EC2 Ubuntu 12.04.2 Linux with NodeJS and PhantomJS