http://railsapps.github.io/installrubyonrails-ubuntu.html https://gorails.com/setup/ubuntu/14.10
Install/update dependencies
sudo apt-get update
//// TODO: dry | |
DependencyResolver.SetResolver(new StructureMapDependencyResolver()); | |
FilterProviders.Providers.Add(new StructureMapFilterAttributeFilterProvider()); | |
//// TODO: dry | |
GlobalFilters.Filters.Add(new HandleErrorAttribute()); | |
GlobalFilters.Filters.Add(new UnitOfWorkFilter()); | |
//// TODO: dry | |
ViewEngines.Engines.Clear(); |
Install Express.js on Windows | |
============================= | |
npm install -g express-generator@4 |
http://railsapps.github.io/installrubyonrails-ubuntu.html https://gorails.com/setup/ubuntu/14.10
Install/update dependencies
sudo apt-get update
choco install VisualStudioCommunity2013 -InstallArguments "/Features:'VC_MFC_Libraries WebTools'" | |
choco install VS2013.3 | |
choco install git | |
choco install SublimeText3 | |
choco install winrar | |
choco install firefox | |
choco install clink | |
choco install notepadplusplus |
# Create your superuser | |
$ mongo | |
> use admin | |
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]}) | |
> exit | |
# Alias for convenience (optional and at your own risk) | |
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile | |
$ source ~/.bash_profile |
public class DependencyConfig | |
{ | |
public static void RegisterDependencies() | |
{ | |
var container = new Container(); | |
container.Configure(cfg => cfg.Scan(scan => | |
{ | |
scan.TheCallingAssembly(); | |
scan.WithDefaultConventions(); |
REM delete bin | |
for /r %R in (bin) do if exist %R (rd /s /q "%R") | |
REM delete obj | |
for /r %R in (obj) do if exist %R (rd /s /q "%R") |
[Migration(201501011618)] | |
public class CreateProduct : AutoReversingMigration | |
{ | |
public override void Up() | |
{ | |
Create.Table("Product") | |
.WithPrimaryKey() // .WithColumn(p => p.Id).AsInt64().NotNullable().PrimaryKey().Identity() | |
.WithName() // .WithColumn("Name").AsString(64).NotNullable() |
public class get_handler | |
{ | |
public SignInModel Execute(SignInRequest request) | |
{ | |
return new SignInModel {ReturnUrl = request.ReturnUrl, LoginFailed = request.LoginFailed}; | |
} | |
} | |
public class post_handler | |
{ |