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
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.Web.UI.DataVisualization.Charting.Chart>" %> | |
<% | |
Model.Page = this.Page; | |
var writer = new HtmlTextWriter(Page.Response.Output); | |
Model.RenderControl(writer); | |
%> |
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
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="HTTP to HTTPS redirect" stopProcessing="true"> | |
<match url="(.*)" /> <!-- Require SSL must be OFF in the site settings --> | |
<conditions> | |
<add input="{HTTPS}" pattern="off" ignoreCase="true" /> | |
</conditions> | |
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}{REQUEST_URI}" /> |
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
@echo off | |
setlocal | |
set path="%CommonProgramFiles(x86)%\microsoft shared\TextTemplating\10.0";"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools";%path% | |
set connStr="Data Source=.\SQLEXPRESS;Initial Catalog=MyDB;Integrated Security=true" | |
REM Download MigratorDotNet from http://code.google.com/p/migratordotnet/ | |
echo Applying migrations | |
..\Libs\Migrator\Migrator.Console SqlServer %connStr% "..\MyProject.Migrations\Bin\Debug\MyProject.Migrations.dll" -trace |
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
@echo off | |
setlocal | |
set path="%programfiles%\IIS\Microsoft Web Deploy";%PATH% | |
msdeploy -verb:sync -source:dbFullSql="Data Source=.\SQLEXPRESS;Initial Catalog=MyDB;Integrated Security=true",computerName=yourcomputer.com ^ | |
-dest:dbFullSql="Data Source=.\SQLEXPRESS;Initial Catalog=MyDB;Integrated Security=true",dropDestinationDatabase=true | |
endlocal |
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 QuerableExtensions | |
{ | |
public static IOrderedQueryable<T> OrderBy<T>(this IQueryable<T> source, string property, bool asc) | |
{ | |
return ApplyOrder<T>(source, property, asc ? "OrderBy" : "OrderByDescending"); | |
} | |
public static IOrderedQueryable<T> OrderBy<T>(this IQueryable<T> source, string property) | |
{ | |
return ApplyOrder<T>(source, property, "OrderBy"); | |
} |
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 VarCharLengthValidatorProvider : AssociatedValidatorProvider | |
{ | |
protected override IEnumerable<ModelValidator> GetValidators(ModelMetadata metadata, ControllerContext context, IEnumerable<Attribute> attributes) | |
{ | |
var columnAttribute = attributes.OfType<System.Data.Linq.Mapping.ColumnAttribute>().FirstOrDefault(); | |
if (columnAttribute == null || !columnAttribute.DbType.ToLower().Contains("varchar")) | |
yield break; | |
var match = Regex.Match(columnAttribute.DbType, @"(\d+)", RegexOptions.IgnoreCase); | |
if (match.Success) |
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
module ActiveSupport | |
module Inflector | |
alias :old_foreign_key :foreign_key | |
def foreign_key(class_name, separate_class_name_and_id_with_underscore = true) | |
old_foreign_key(class_name, false) | |
end | |
def tableize(class_name) | |
class_name | |
end | |
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
<configSections> | |
<section name="nhaml" type="NHaml.Configuration.NHamlConfigurationSection, NHaml"/> | |
</configSections> | |
<nhaml templateCompiler="CSharp4" useTabs="true"> | |
<assemblies> | |
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> | |
<add assembly="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> | |
</assemblies> | |
</nhaml> |
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
require 'rubygems' | |
require 'sinatra/base' | |
require 'haml' | |
require 'models' | |
require 'rack-flash' | |
require 'pony' | |
require 'mime/types' | |
class App < Sinatra::Base | |
enable :sessions |
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
recipe Running jQuery recipe... | |
/usr/lib/ruby/1.8/open-uri.rb:174:in `open_loop': redirection forbidden: http://github.com/rails/jquery-ujs/raw/master/src/rails.js -> https://github.com/rails/jquery-ujs/raw/master/src/rails.js (RuntimeError) | |
from /usr/lib/ruby/1.8/open-uri.rb:132:in `open_uri' | |
from /usr/lib/ruby/1.8/open-uri.rb:518:in `open' | |
from /usr/lib/ruby/1.8/open-uri.rb:30:in `open' | |
from /usr/lib/ruby/gems/1.8/gems/thor-0.14.3/lib/thor/actions/file_manipulation.rb:55:in `get' | |
from http://railswizard.org/f866948c3a033b907ff4.rb:79:in `apply' | |
from /usr/lib/ruby/gems/1.8/gems/thor-0.14.3/lib/thor/actions.rb:167:in | |
`inside' | |
from /usr/lib/ruby/1.8/fileutils.rb:121:in `chdir' |
OlderNewer