Skip to content

Instantly share code, notes, and snippets.

View mrinalwahal's full-sized avatar
🤔
Dreaming

Mrinal Wahal mrinalwahal

🤔
Dreaming
View GitHub Profile
try {
$url = "https://wahal.free.beeceptor.com"
$body = @{
"key" = "value"
} | ConvertTo-Json
$response = Invoke-WebRequest -Uri $url -Method POST -Body $body -ContentType "application/json"
if ($response.StatusCode -ne 200) {
throw "Request failed with status code: $($response.StatusCode)"
@mrinalwahal
mrinalwahal / main.go
Last active May 15, 2021 00:21
Resumable File Uploader with Min.io & Tus
package main
import (
"crypto/rsa"
"io/ioutil"
"log"
"net/http"
"os"
"github.com/aws/aws-sdk-go/aws"
@mrinalwahal
mrinalwahal / flask-statsd-tutorial.py
Created October 2, 2019 18:03
Statsd with Flask Technical Blog Support File
# Statsd Tutorial Application
# Author: Mrinal Wahal
# import dependencies
from flask import Flask, request
from flask import render_template
from flask import redirect
from flask_sqlalchemy import SQLAlchemy
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl