Problem: We are receiving JavaScript objects back from a web server which contain arbitrary data. This includes a hash of
DynamicData
which is used to hydrate some HTML. The HTML is based on partials that are stored on the server and bound to the JavaScript objects by a unique Widget ID.
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
# Edit Global .gitconfig, Adding/Updating the Following Section | |
[alias] | |
s = status -su | |
d = difftool | |
c = commit -am | |
co = checkout | |
l = log --pretty=oneline -20 | |
log-del = log --diff-filter=D -- | |
b = branch |
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
# Big Thanks to : http://ubuntuforums.org/showthread.php?t=35087 | |
# If you don't fancy the script - check out http://clonezilla.org | |
##### Backing Up ##### | |
# Dead Easy Since Ubuntu Doesn't Lock Anything! | |
# Get Sudo and Browse to Root | |
sudo su | |
cd / |
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 interface ICustomerRepository | |
{ | |
Customer RetrieveById(string id); | |
} | |
public class CustomerSessionCacheRepository(ICustomerRepository innerRepository) : ICustomerRepository | |
{ | |
public Customer RetrieveById(string id) | |
{ | |
if (_cache.Contains(id)) |
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
using System; | |
using System.Globalization; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Text; | |
using System.Web.Mvc; | |
namespace Extensions | |
{ | |
public static class HtmlHelperExtensions |
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
# Build Checklist (http://ruby.about.com/od/rubyversionmanager/ss/installrvmlinux_2.htm) | |
$ sudo apt-get install build-essential | |
$ sudo apt-get install curl | |
$ sudo apt-get install zlib1g-dev libreadline5-dev libssl-dev libxml2-dev libopenssl-ruby | |
# Install Distro Version of Ruby (Since RVM Is Written in Ruby) | |
$ sudo apt-get install ruby1.8 rubygems1.8 | |
# First Install RVM (http://rvm.beginrescueend.com/) | |
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) |
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
<!-- | |
From: http://toostep.com/trends/iis-7-change-concurrunt-connection-limit-in-iis7-for-maximum | |
Open: %windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet.config | |
--> | |
<system.web> | |
<applicationPool | |
maxConcurrentRequestsPerCPU="5000" | |
maxConcurrentThreadsPerCPU="2" |
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 class MyService | |
{ | |
private Func<IDep1> Dep1Factory; | |
private Func<IDep2> Dep2Factory; | |
IDep1 Dep1 { get { return Dep1Factory(); } } | |
IDep2 Dep2 { get { return Dep2Factory(); } } | |
public MyService() | |
{ |
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
# Some gems I can't seem to live without :) | |
# Run this bad boy with: "ruby < <(curl https://raw.github.com/gist/1087827/gembag.rb)" | |
gems = %w{ | |
rails | |
bundler | |
haml | |
json | |
heroku | |
faker | |
autotest |
OlderNewer