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
| // I mean, seriously, localStorage is supported even by your mum. How about instead of | |
| // casing the feature out, you give users in-memory (stale) storage instead? | |
| // If they close your application, they deserve to lose data anyway. | |
| // if (!('localStorage' in window)) { | |
| if (!Modernizr.localstorage) { | |
| window.localStorage = { | |
| _data : {}, | |
| setItem : function(id, val) { return this._data[id] = String(val); }, | |
| getItem : function(id) { return this._data.hasOwnProperty(id) ? this._data[id] : undefined; }, |
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
| public HttpContextBase FakeHttpContext() { | |
| var context = new Mock<HttpContextBase>(); | |
| var files = new Mock<HttpFileCollectionBase>(); | |
| var request = new Mock<HttpRequestBase>(); | |
| var response = new Mock<HttpResponseBase>(); | |
| var session = new Mock<HttpSessionStateBase>(); | |
| var server = new Mock<HttpServerUtilityBase>(); | |
| var user = new Mock<IPrincipal>(); | |
| var identity = new Mock<IIdentity>(); | |
| request.Setup(req => req.ApplicationPath).Returns("~/"); |
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
| // Provides a device_scale class on iOS devices for scaling user | |
| // interface elements relative to the current zoom factor. | |
| // | |
| // http://37signals.com/svn/posts/2407-device-scale-user-interface-elements-in-ios-mobile-safari | |
| // Copyright (c) 2010 37signals. | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
| #!/bin/sh | |
| # Check if the individual developer has his own hook | |
| CMD_NAME=`basename $0` | |
| if [ -f $GIT_DIR/hooks/personal/$CMD_NAME ] | |
| then | |
| # If so, run it. $@ passes all the command line arguments passed to this function | |
| # If the personal hook fails, fail this one as well | |
| if ! $GIT_DIR/hooks/personal/$CMD_NAME $@ | |
| then |
NewerOlder