Skip to content

Instantly share code, notes, and snippets.

View rahulbagal's full-sized avatar
🎯
Focusing

Rahul Bagal rahulbagal

🎯
Focusing
View GitHub Profile
@rahulbagal
rahulbagal / gist:0d1992f9d4bd16b6b475695385bbd13e
Created May 28, 2020 18:01
Dotnet core - File upload size limit
I had a ASP.net MVC application written in dotnet core. When I was trying to upload a large file 50MB using a post request , it was giving resource not found error.
Applicatin was hosted on Azure WebApp ( Basic plan )
Actually the post request was larger than default post request.
Fix - Adding following section in web.config under <system.webServer> solved the issue . Now , it supports file upload upto ~ 300 MB
<!--Increase upload file size limit to 300 MB-->
<security>
<requestFiltering>
@rahulbagal
rahulbagal / dart.password.check
Created April 26, 2019 11:53
Dart : How to check if password contains all required characters
# Dart: Validate Password
This code snippet shows how to validate a password
**Requirement** :
Password should be more than 8 characters long
It should contain
at least one Uppercase ( Capital ) letter
at least one lowercase character
at least digit and
special character.
@rahulbagal
rahulbagal / gist:65c30b6e2d95d503da5c0e7eefa44701
Created April 17, 2018 19:29
Azure Triggered Webjob - When you programatically want to start an azure webjob , you can sent a call to WEB HOOK . Below function call webhook URL with HTTP Basic authentication.
static void WakeupWebjob()
{
var jobUrl = ConfigurationManager.AppSettings["sms-webjob-trigger-url"];
var jobUser = ConfigurationManager.AppSettings["sms-webjob-trigger-user"];
var jobPwd = ConfigurationManager.AppSettings["sms-webjob-trigger-pwd"];
Uri jobUri = new Uri(jobUrl);
var request = (HttpWebRequest)WebRequest.Create(jobUrl);
var postData = "";
var data = Encoding.ASCII.GetBytes(postData);
request.Method = "POST";
@rahulbagal
rahulbagal / gist:bc33673bd02ef467f705eb5828ca841f
Created January 10, 2018 16:30 — forked from ericandrewlewis/gist:95239573dc97c0e86714
Setting up a WordPress site on AWS

Setting up a WordPress site on AWS

This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.

This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.

If you experience any difficulties or have any feedback, leave a comment. 🐬

Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.

@rahulbagal
rahulbagal / gist:54e8fd9bd54a31398dc7087b659c914c
Created December 16, 2016 23:50
How to Build an IoT using AWS IOT
Example Video https://www.youtube.com/watch?v=tTazcL61JG8
@rahulbagal
rahulbagal / gist:e25d7215864525f80bb72a4d3d1c2c93
Created December 16, 2016 23:50
How to Build an IoT using AWS IOT
Example Video https://www.youtube.com/watch?v=tTazcL61JG8