Skip to content

Instantly share code, notes, and snippets.

:octocat:
Focusing

Gayan Ranasinghe empitegayan

:octocat:
Focusing
Block or report user

Report or block empitegayan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@empitegayan
empitegayan / RemoveComment
Created Mar 28, 2019
remove commets and regions
View RemoveComment
/*** COMMENT REMOVE ***/
\/\*[\s\S]*?\*\/|([^:]|^)\/\/.*$
/*** REGION REMOVE ***/
^[ \t]*\#[ \t]*(region|endregion).*\n
@empitegayan
empitegayan / UploadImageWebApi.cs
Created Oct 8, 2018
Upload file asp.net web api
View UploadImageWebApi.cs
[Route("user/PostUserImage")]
public async Task<HttpResponseMessage> PostUserImage()
{
Dictionary<string, object> dict = new Dictionary<string, object>();
try
{
var httpRequest = HttpContext.Current.Request;
foreach (string file in httpRequest.Files)
@empitegayan
empitegayan / 0_reuse_code.js
Created Sep 12, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.