Skip to content

Instantly share code, notes, and snippets.

View divyang4481's full-sized avatar

Divyang Panchasara divyang4481

View GitHub Profile
@divyang4481
divyang4481 / api_backends.conf
Created July 14, 2023 02:36 — forked from nginx-gists/api_backends.conf
Deploying NGINX Plus as an API Gateway, Part 1
upstream warehouse_inventory {
zone inventory_service 64k;
server 10.0.0.1:80;
server 10.0.0.2:80;
server 10.0.0.3:80;
}
upstream warehouse_pricing {
zone pricing_service 64k;
server 10.0.0.7:80;
@divyang4481
divyang4481 / WinRAR_Licence.bat
Created September 4, 2022 03:32 — forked from cakmakali/WinRAR_Licence.bat
WinRAR Activation
@echo off
title WinRAR Activate
if exist "C:\Program Files\WinRAR\rarreg.key" (
echo WinRAR already licenced.
) else (
( echo RAR registration data
echo riyou.com
echo Unlimited Company License
echo UID=0cbc778fd3ae69e9e398
echo 6412212250e39828667dcf0b34f07ece8ffaeb60b2c320d494933e
@divyang4481
divyang4481 / pipeline.groovy
Created April 27, 2022 14:25 — forked from lvthillo/pipeline.groovy
Scripted Jenkins pipeline which uses Kubernetes plugin
podTemplate(label: 'mypod', containers: [
containerTemplate(name: 'git', image: 'alpine/git', ttyEnabled: true, command: 'cat'),
containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', command: 'cat', ttyEnabled: true),
containerTemplate(name: 'docker', image: 'docker', command: 'cat', ttyEnabled: true)
],
volumes: [
hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock'),
]
) {
node('mypod') {
@divyang4481
divyang4481 / IsolatedHostingExtensions.cs
Created January 10, 2022 17:25 — forked from RianFuro/IsolatedHostingExtensions.cs
IsolatedMap from AspNet.Hosting.Extensions module split up into Add...() and Use...() functions to facilitate starting HostedServices from the isolated containers.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Builder.Internal;
using Microsoft.AspNetCore.Hosting.Internal;
using Microsoft.AspNetCore.Http;
@divyang4481
divyang4481 / visualstudio2019Key.txt
Last active November 15, 2020 12:54
Visual Studio 2019 Product Key
Visual Studio 2019 Product Key
[Please Star this gist]
Follow My GitHub Account --> https://github.com/ch-kashif @ch-kashif
**Follow Me On Instagram -->> https://www.instagram.com/ch.kashif602/ **
Lets do a code together
Join Cloud Disk repository --> https://github.com/ch-kashif/CloudDisk
@divyang4481
divyang4481 / generic_host-vs-spring_boot.md
Created July 2, 2020 14:17 — forked from Lakritzator/generic_host-vs-spring_boot.md
A comparison between Javas Spring-Boot and the Generic Host of dotnet core

This is work in progress

I read about the .NET Generic Host for the first time in a Tweet of David Fowler. And I was hooked by the idea, it was just what I was looking for.

I like modules making things small but fit together like pieces of a puzzle, if possible being able to reuse them. I started refactoring Greenshot over a year ago, and was making modules out of the spaghetti code that it was. Trying to extract the modules into their own nuget packages, making them more generic and testable. I glued them together with some code I wrote, which is availble in Dapplo.Addons, but I knew that this was just a journey, until I found something that is a better with more potential.

I found the following description: _The purpose of Generic Host is to enable a wider array of host scenarios. Messaging, backg

<div class='container'>
<h1>SASS - Mixins</h1>
<h2><span>Basic</span> - Getting Started</h2>
<p id='mypara'>Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor <br>
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi</p>
<div class='container'>
<h1>SASS - Mixins</h1>
<h2><span>Basic</span> - Getting Started</h2>
<p id='mypara'>Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor <br>
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi</p>
<div class='container'>
<h1>SASS - Mixins</h1>
<h2><span>Basic</span> - Getting Started</h2>
<p id='mypara'>Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor <br>
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi</p>
@divyang4481
divyang4481 / Instructions.md
Created March 18, 2020 23:01 — forked from shreyaskarnik/Instructions.md
Route Docker Logs to ELK Stack
  • With Docker 1.8.0 shipped new log-driver for GELF via UDP, this means that the logs from Docker Container(s) can be shipped directly to the ELK stack for further analysis.
  • This tutorial will illustrate how to use the GELF log-driver with Docker engine.
  • Step 1: Setup ELK Stack:
    • docker run -d --name es elasticsearch
    • docker run -d --name logstash --link es:elasticsearch logstash -v /tmp/logstash.conf:/config-dir/logstash.conf logstash logstash -f /config-dir/logstash.conf
    • Note the config for Logstash can be found at this link
    • docker run --link es:elasticsearch -d kibana
  • Once the ELK stack is up now let's fire up our nginx container which ships its logs to ELK stack.
  • LOGSTASH_ADDRESS=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' logstash)
  • `docker run -d --net=host --log-driver=gelf --log-opt gelf-address=u