Download and install the agent(s). These examples are on a standard 64-bit Amazon EC2 Linux AMI.
MMS
wget [path to mms agent download, specified by 10gen]
sudo tar xvzf 10gen-mms-agent-[CUSTOM_NAME].tar.gz -C /opt
| [System.Reflection.Assembly]::LoadFile("path to twilio assembly") | out-null | |
| $twilio = new-object Twilio.TwilioRestClient("accountSid", "authToken") | |
| $msg = $twilio.SendSmsMessage("+15551112222", "+15553334444", "Can you believe it's this easy to send an SMS?!") |
| # Run at 11:28 PM on Sunday the 11th | |
| Date.today | |
| => Sun, 11 Dec 2011 | |
| Date.tomorrow | |
| => Tue, 13 Dec 2011 |
| <TemplatesExport family="Live Templates"> | |
| <Template uid="23818653-ac72-4057-9afc-35649cdfe0fc" shortcut="migration" description="FluentMigrator Migration" text="[Migration($VERSION$)]
public class $MIGRATION_NAME$ : Migration
{
 public override void Up()
 {
 $UP$
 }

 public override void Down()
 {
 $DOWN$
 }
}" reformat="True" shortenQualifiedReferences="True"> | |
| <Context> | |
| <CSharpContext context="Everywhere" minimumLanguageVersion="2.0" /> | |
| </Context> | |
| <Categories /> | |
| <Variables> | |
| <Variable name="VERSION" expression="getCurrentTime("yyyyMMddHHmmss")" initialRange="0" /> | |
| <Variable name="MIGRATION_NAME" expression="" initialRange="0" /> | |
| <Variable name="UP" expression="constant("throw new NotImplementedException();")" initialRange="0" /> |
| public static class StringExtensions | |
| { | |
| public static bool Is(this string value, string compareTo) | |
| { | |
| return value.Is(compareTo, StringComparison.OrdinalIgnoreCase); | |
| } | |
| public static bool Is(this string value, string compareTo, StringComparison stringComparison) | |
| { | |
| return String.Equals(value, compareTo, stringComparison); |
| Repo: https://github.com/aaronlerch/cheat | |
| Current spike set up at: http://cheat-cedar.herokuapp.com/ | |
| The gem 'ambition' requires 'ParseTree' which isn't compatible with 1.9.2. Recommendations on next steps? | |
| 2012-12-07T03:55:30+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 52103` | |
| 2012-12-07T03:55:35+00:00 app[web.1]: *** Sorry, ParseTree doesn't work with ruby 1.9.2 | |
| 2012-12-07T03:55:36+00:00 heroku[web.1]: Process exited with status 1 |
| The ToRedisEndPoints extension method ( found here: https://github.com/ServiceStack/ServiceStack.Redis/blob/master/src/ServiceStack.Redis/RedisExtensions.cs ) doesn't know how to process a string-based redis endpoint using URI syntax. | |
| Example: this fails to parse. | |
| redis://user-is-not-used:password-is-used@my-redis-server:1234/5678 | |
| It more strictly expects a format that is: | |
| password@host:port | |
| If I pass it the URI above ("redis://" prefixed) then it fails to process. |
| fs() { | |
| if [ "$#" -lt 1 ] | |
| then | |
| echo "A search string is required" | |
| return | |
| fi | |
| find . -iname "${2:-*.cs}" | xargs grep "$1" -s | |
| } |
| using System; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Collections.Generic; | |
| using Funq; | |
| using Microsoft.AspNet.SignalR; | |
| namespace Foo | |
| { | |
| public class FunqDependencyResolver : DefaultDependencyResolver |
| var domain = Thread.GetDomain(); // or AppDomain.Current | |
| domain.SetData(".appDomain", "yep"); | |
| domain.SetData(".appVPath", "/"); | |
| domain.SetData(".appPath", domain.BaseDirectory); | |
| if (String.IsNullOrWhiteSpace(domain.GetData(".appId") as string)) | |
| { | |
| domain.SetData(".appId", "1"); | |
| } | |
| if (String.IsNullOrWhiteSpace(domain.GetData(".domainId") as string)) | |
| { |