Skip to content

Instantly share code, notes, and snippets.

@seif
seif / gist:3836732
Created October 4, 2012 21:55
Convert markdown to srt
for f in *.md; do pandoc -f markdown -t rst $f -o ${f%.md}.srt; done
@seif
seif / SFtpClient.cs
Created April 4, 2012 13:49
Tamir.SSH SftpClient
public class SFtpClient
{
private readonly IConfiguration _configuration;
private readonly Sftp sftp;
public Action<FileDownloadedEvent> OnFileDownloaded { get; set; }
public FtpClient(IConfiguration _configuration)
{
@seif
seif / first exception
Created February 26, 2012 02:08
ZeroMQ Exception
System.Runtime.InteropServices.SEHException was unhandled by user code
Message=External component has thrown an exception.
Source=clrzmq
ErrorCode=-2147467259
StackTrace:
at ZMQ.C.zmq_msg_size(IntPtr msg)
at ZMQ.Socket.Recv(Byte[] message, Int32& size, SendRecvOpt[] flags) in c:\Users\Johnny\Documents\Projects\clrzmq\src\clrzmq\Socket.cs:line 481
at ZMQ.Socket.Recv(SendRecvOpt[] flags) in c:\Users\Johnny\Documents\Projects\clrzmq\src\clrzmq\Socket.cs:line 510
at ZMQ.Socket.Recv(Int32 timeout) in c:\Users\Johnny\Documents\Projects\clrzmq\src\clrzmq\Socket.cs:line 534
at ZMQ.Socket.Recv(Encoding encoding, Int32 timeout) in c:\Users\Johnny\Documents\Projects\clrzmq\src\clrzmq\Socket.cs:line 583
@seif
seif / Song.cs
Created February 10, 2012 18:35
sharp arch validator and entity with typed id
[HasUniqueDomainSignatureWithGuidId]
public class Song : EntityWithTypedId<Guid>
{
public Song()
{
}
[DomainSignature]
public virtual string SongTitle { get; set; }
@seif
seif / index.cshtml
Created November 1, 2011 20:27
S#harp Architecture wiki Simple CRUD Application Sample views
@model IEnumerable<IceCreamYouScreamCorp.Domain.Product>
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<p>
@Html.ActionLink("Create New", "Create")