Skip to content

Instantly share code, notes, and snippets.

View rudygt's full-sized avatar
💭
code ftw

Rudy Alvarez rudygt

💭
code ftw
View GitHub Profile
@johnmmoss
johnmmoss / gist:8ee16837513ab69de4f3
Last active June 9, 2017 03:48
ASP.NET MVC FileStreamResult Example
// /File/Stream
public FileStreamResult Stream()
{
var fileContent = new byte[] { Ascii.one, Ascii.Comma, Ascii.two, Ascii.Comma, Ascii.three };
var stream = new MemoryStream(fileContent);
var fileStreamResult = new FileStreamResult(stream, mimeType);
fileStreamResult.FileDownloadName = "FileStreamExample.csv";
return fileStreamResult;
}
@imjasonh
imjasonh / markdown.css
Last active January 3, 2025 20:15
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@amitchhajer
amitchhajer / Count Code lines
Created January 5, 2013 11:08
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n