Skip to content

Instantly share code, notes, and snippets.

@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")
@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 / 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 / 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 / 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 / default.rb
Last active December 10, 2015 05:38 — forked from anonymous/default.rb
tc = Teamcity::Utility.new(:server=>"#{node.teamcity.server}", :port => 80, :username => "#{node.teamcity.username}", :password => "#{node.teamcity.password}")
build_version = tc.get_latest_build('bt134')
teamcity_build_type = 'bt134'
teamcity_build "download-artefact" do
build_type teamcity_build_type
version build_version
destination "C:\\Temp\\#{teamcity_build_type}\\#{build_version}.zip"
overwrite true
@seif
seif / default.rb
Created December 27, 2012 16:06
Mofied chef recipe
tc = Teamcity::Utility.new(:server=>"#{node.teamcity.server}", :port => 80, :username => "#{node.teamcity.username}", :password => "#{node.teamcity.password}")
build_version = tc.get_latest_build('bt134')
teamcity_build_type = 'bt134'
windows_batch "run_dropkick" do
code <<-EOH
cd C:\\Temp\\#{teamcity_build_type}\\#{build_version}\\Deployment
execute-#{node.chef_environment}-all.bat
EOH
@seif
seif / chef-stackreace.out
Last active December 10, 2015 07:18
template resource not notifying
Generated at 2013-01-02 23:06:59 +0000
RuntimeError: template[C:/Temp/bt97/1.8.9-alpha-01133/Deployment/Settings/CHEF.js] (Wiggle_Billing::default line /chef/cache/cookbooks/Wiggle_Billing/recipes/default.rb) had an error: RuntimeError: Must specify username, group or SID: 0
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/file_access_control/windows.rb:98:in `get_sid'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/file_access_control/windows.rb:306:in `target_owner'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/file_access_control/windows.rb:275:in `target_dacl'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/file_access_control/windows.rb:114:in `should_update_dacl?'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/file_access_control/windows.rb:45:in `requires_changes?'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/provider/file.rb:179:in `define_resource_requir
@seif
seif / gist:4452128
Created January 4, 2013 12:02
What is setting the mode?
localhost [2013-01-04T11:20:39+00:00] INFO: *** Chef 10.16.4 ***
localhost [2013-01-04T11:21:04+00:00] INFO: Run List is [recipe[chef-client], role[base], role[ravendb_server], role[Wiggle_Billing]]
localhost [2013-01-04T11:21:04+00:00] INFO: Run List expands to [chef-client, wiggle::prepare_windows, ms_dotnet35, ms_dotnet4, chocolatey, wiggle::ravendb, ms_messagequeue, Wiggle_Billing]
localhost [2013-01-04T11:21:05+00:00] INFO: Starting Chef Run for WIN-5SMRIK4TSD7.wiggledomain.wiggle.co.uk
localhost [2013-01-04T11:21:05+00:00] INFO: Running start handlers
localhost [2013-01-04T11:21:05+00:00] INFO: Start handlers complete.
localhost [2013-01-04T11:21:07+00:00] INFO: Loading cookbooks [Wiggle_Billing, chef-client, chef_handler, chocolatey, ms_dotnet35, ms_dotnet4, ms_messagequeue, powershell, teamcity, wiggle, windows]
localhost [2013-01-04T11:21:08+00:00] INFO: Powershell light-weight provider already initialized -- overriding!
localhost [2013-01-04T11:21:08+00:00] INFO: Powershell light-weight resource alr
@seif
seif / out.txt
Created January 19, 2013 01:29
Git submodule update timeout
git clone https://github.com/sharparchitecture/Sharp-Architecture.git
Cloning into 'Sharp-Architecture'...
remote: Counting objects: 13801, done.
remote: Compressing objects: 100% (4190/4190), done.
remote: Total 13801 (delta 9338), reused 13551 (delta 9132)
Receiving objects: 100% (13801/13801), 85.33 MiB | 2.36 MiB/s, done.
Resolving deltas: 100% (9338/9338), done.
cd Sharp-Architecture
git submodule init