This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var job = new Job { | |
| Cron = "* * * * *", | |
| Name = "job1", | |
| CancellationToken = CancellationToken.None, | |
| AutoRun = true, // run once when scheduler starts then use the cron to schedule | |
| Execute = j => Console.Run("running job"); | |
| }; | |
| var scheduler = new Scheduler(); | |
| scheduler.Add(job); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Exclude the build directory | |
| build/* | |
| # Exclude temp nibs and swap files | |
| *~.nib | |
| *.swp | |
| # Exclude OS X folder attributes | |
| .DS_Store | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using AppFunc = Func< // Call | |
| IDictionary<string, object>, // Environment | |
| IDictionary<string, string[]>, // Headers | |
| Stream, // Body | |
| Task<Tuple< //Result | |
| IDictionary<string, object>, // Properties | |
| int, // Status | |
| IDictionary<string, string[]>, // Headers | |
| Func< // CopyTo | |
| Stream, // Body |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @synthesize firstName = _firstName; | |
| @synthesize txtFirstName = _txtFirstName; | |
| [RACAbleSelf(self.firstName) subscribeNext:^(id x) { [self firstNameChanged:x]; }]; | |
| [self rac_bind:RAC_KEYPATH_SELF(self.firstName) to:self.txtFirstName.rac_textSubscribable]; | |
| - (void) firstNameChanged:(id)firstName { | |
| NSLog(@"changed: %@", firstName); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using Cassette; | |
| using Cassette.HtmlTemplates; | |
| using Cassette.Scripts; | |
| using Cassette.Stylesheets; | |
| /// <summary> | |
| /// Configures the Cassette asset modules for the web application. | |
| /// </summary> | |
| public class CassetteConfiguration : IConfiguration<BundleCollection> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyClass : NancyModule | |
| { | |
| public MyClass() | |
| { | |
| Get[Route.Root() | |
| .AnyStringAtLeastOnce("a").And() | |
| .AnyIntAtLeastOnce("b").And() | |
| .AnyIntAtLeastOnce("c").And() | |
| .AnyIntAtLeastOnce("d")] = | |
| x => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var io = new SocketIo(); | |
| io.Sockets.On("connection", socket => { | |
| io.Sockets.Emit("this", new { will = "be received by everyone "}); | |
| socket.On("private message", (from, msg) => { | |
| Debug.WriteLine("I received a private message by " + from + " saying " + msg); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ../../Source/.nuget/NuGet.exe push Facebook.6.0.21-beta.nupkg -Source http://nuget.gw.symbolsource.org/Pub | |
| lic/NuGet -ApiKey xxxxxxxxx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // goal to use this in both nancy and mvc | |
| @Html.Universal().PagedList(); | |
| // UnivesalHtmlHelper.dll | |
| public inteface IUniversalHtmlStringFactory { | |
| IUniversalHtmlString Create(string str); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
| <PropertyGroup> | |
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
| <Platform Condition=" '$(Platform)' == '' ">x86</Platform> | |
| <ProductVersion>8.0.30703</ProductVersion> | |
| <SchemaVersion>2.0</SchemaVersion> | |
| <ProjectGuid>{F1F3A37D-3372-446D-966E-DB01F710AA55}</ProjectGuid> | |
| <OutputType>Exe</OutputType> | |
| <AppDesignerFolder>Properties</AppDesignerFolder> |