Skip to content

Instantly share code, notes, and snippets.

View anuragdhingra's full-sized avatar
🏠
Working from home

Anurag Dhingra anuragdhingra

🏠
Working from home
  • Monstar Lab Inc | IIT Roorkee
  • Tokyo, Japan
View GitHub Profile
@anuragdhingra
anuragdhingra / main.go
Last active May 18, 2020 10:32
Sum of squares without using a for loop in go.
package main
import "fmt"
// Global vars
var arr []int
var sos int
func check(err error) {
if err != nil {
@anuragdhingra
anuragdhingra / swagger_middleware.go
Last active April 30, 2020 07:38
Middleware to serve the swagger UI without the need to download/generate or maintain any static assets.
package docs
import (
"github.com/go-openapi/runtime/middleware"
"net/http"
"strings"
)
func SwaggerMiddleware(handler http.Handler) http.Handler {
var r middleware.RedocOpts
@anuragdhingra
anuragdhingra / AZURE_CLI.md
Created May 18, 2020 10:43
Clone all your azure DevOps repositories in your organization at once using Azure CLI.
  1. Install Azure CLI
brew install azure-cli
  1. Add the DevOps CLI extension -
az extension add --name azure-devops
  1. Set your default organization and project -