This file contains 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
/// <summary> | |
/// ALL of this was copied directly out of Nancy.Owin.dll's source: | |
/// https://github.com/NancyFx/Nancy/blob/master/src/Nancy.Owin/NancyOwinHost.cs | |
/// | |
/// For the SOLE PURPOSE of customizving: | |
/// var nancyRequestStream = new RequestStream(owinRequestBody, ExpectedLength(owinRequestHeaders), 1048576, false); | |
/// </summary> | |
namespace FunkyTown | |
{ | |
using System; |
This file contains 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
App.PushClient = Em.Object.extend | |
members: prop -> | |
Em.A() | |
connect: (key, userId) -> | |
return unless Pusher? | |
@pusher?.disconnect() | |
@pusher = new Pusher key, |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
worlds["myserver"] = "/opt/msm/servers/myserver/world" | |
def playerIcons(poi): | |
if poi['id'] == 'Player': | |
poi['icon'] = "http://overviewer.org/avatar/%s" % poi['EntityId'] | |
return "Last known location for %s" % poi['EntityId'] | |
def signFilter(poi): | |
if poi['id'] == 'Sign': | |
return "\n".join([poi['Text1'], poi['Text2'], poi['Text3'], poi['Text4']]) |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am aaronlerch on github. | |
* I am aaronlerch (https://keybase.io/aaronlerch) on keybase. | |
* I have a public key whose fingerprint is 4D45 4934 A0A0 1E9D 61FA EC85 9AD4 01C7 C20F 3B87 | |
To claim this, I am signing this object: |
This file contains 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
# ... | |
group :development, :test do | |
# ... | |
gem "guard", require: false | |
gem "guard-shell", require: false | |
# ... | |
end | |
# ... |
This file contains 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
[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?!") |
This file contains 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
# Run at 11:28 PM on Sunday the 11th | |
Date.today | |
=> Sun, 11 Dec 2011 | |
Date.tomorrow | |
=> Tue, 13 Dec 2011 |
This file contains 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
<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" /> |
This file contains 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
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); |
OlderNewer