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;
/**
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@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 / cs
Created May 9, 2021 12:37
Prefix and Suffix Search
public class WordFilter {
private string[] _words;
public WordFilter(string[] words) {
_words =words;
}
public int F(string prefix, string suffix) {
int ans = -1;
var prefixLength =prefix.Length;
@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>