Skip to content

Instantly share code, notes, and snippets.

View akshayKhot's full-sized avatar
🎯
Focusing

Akshay Khot akshayKhot

🎯
Focusing
View GitHub Profile
@abitofhelp
abitofhelp / Dockerfile-DeployAspNet2IISWithPsWebDeploy
Created December 19, 2018 07:39
Dockerfile to deploy an AspNet app to IIS in a container using PSWebDeploy
# The general framwork of my script is based on fragments from all over the Internet, including
# the following website. Since there is no clear owner of this information and it was contributed
# by many people, I am assuming that an MIT license is appropriate.
# https://fluentbytes.com/deploying-asp-net-4-5-to-docker-on-windows/
# docker run -p 8088:80 --restart always --name aspnetdocker -dit abitofhelp/aspnetdocker
# Now we can browse to the website. Be aware that you can only reach the container from the outside,
# so if you would browse to localhost, which results in the #127.0.0.0 you will not see any results.
# You need to address your machine on its actual hostname or outside IP address.
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@leggetter
leggetter / gist:769688
Created January 7, 2011 16:23
How to get the body of a HTTP Request using C#
private string GetDocumentContents(System.Web.HttpRequestBase Request)
{
string documentContents;
using (Stream receiveStream = Request.InputStream)
{
using (StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8))
{
documentContents = readStream.ReadToEnd();
}
}