I hereby claim:
- I am nberardi on github.
- I am nberardi (https://keybase.io/nberardi) on keybase.
- I have a public key whose fingerprint is 2404 DB48 5F66 9949 BECB A593 FFE7 811A CF75 F8CE
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
public class HomeController : Controller { | |
public ActionResult Index () { | |
ViewBag.ExecuteAction = () => { | |
// do stuff here | |
return model; | |
}; | |
return View(); | |
} | |
} |
@TextSearchField("test", "test", true) | |
@helper TextSearchField(string name, string label, bool autocomplete) | |
{ | |
<div class="searchCrit"> | |
<label for="@name">@label</label> | |
@if(autocomplete) { | |
<input type="text" name="@name" class="autocompleteField" /> | |
} |
using System; | |
using System.Diagnostics; | |
using System.Threading.Tasks; | |
using FluentCassandra; | |
using FluentCassandra.Types; | |
namespace CassandraTest1 | |
{ | |
class Program | |
{ |
############################################################################### | |
# global variables | |
############################################################################### | |
$profileDir = [System.IO.Path]::GetDirectoryName($profile) | |
############################################################################### | |
# Set up a simple prompt, adding the git prompt parts inside git repos | |
############################################################################### | |
function prompt { | |
$realLASTEXITCODE = $LASTEXITCODE |
public static byte[] ZlibCompress(byte[] data) | |
{ | |
using (MemoryStream outStream = new MemoryStream()) | |
{ | |
// zlib header | |
outStream.WriteByte(0x58); | |
outStream.WriteByte(0x85); | |
// zlib body | |
using (var compressor = new DeflateStream(outStream, CompressionMode.Compress, true)) |
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
namespace System | |
{ | |
public class DateTimePrecise | |
{ | |
private static readonly DateTimePrecise Instance = new DateTimePrecise(10); |
#r "System.Drawing.dll" | |
using System.IO; | |
using System.Drawing; | |
using System.Net; | |
var client = new WebClient(); | |
var bytes = client.DownloadData("http://www.hdwallpapersplus.com/wp-content/uploads/2013/05/Funny-Cat-Pictures-cats-935656_500_375.jpg"); | |
var stream = new MemoryStream(bytes); | |
var image = Image.FromStream(stream); |
#r "System.Drawing.dll" | |
/* | |
* To use a GitHub Gist with Executify, you need to have a | |
* file named "executify.csx" in your Gist. Then you reference | |
* the Gist Identity in the Executify URL as | |
* http://executify.com/gist/{gist_id} | |
*/ | |
using System.IO; |
public unsafe class NSDataStream : UnmanagedMemoryStream | |
{ | |
public NSDataStream(NSData data) | |
: base((byte*)data.Bytes, data.Length) | |
{ | |
_data = data; | |
} | |
private readonly NSData _data; |