Joseph Michael Pesch
VP Programming

BundleConfig EnableOptimizations Breaks Font Awesome

by 30. August 2015 15:13

When using Font Awesome with bundling and optimization you need to add the CssRewriteUrlTransform() to the font awesome bundle (as shown below).

BundleTable.EnableOptimizations = true;

bundles.Add(new StyleBundle("~/bundles/css/font-awesome").Include(
  "~/css/font-awesome.min.css", new CssRewriteUrlTransform()
));

Tags:

CSS

Bootstrap Image Slider Center Image

by 30. August 2015 12:03

div.carousel-wrapper{
    width: 80%; /* for example */
    margin: auto;
}

.carousel-inner > .item > img,
.carousel-inner > .item > a > img{
width: 100%; /* use this, or not */
margin: auto;
}

Tags:

CSS

Bootstrap Image Slider Center Image

by 30. August 2015 12:03

div.carousel-wrapper{
    width: 80%; /* for example */
    margin: auto;
}

.carousel-inner > .item > img,
.carousel-inner > .item > a > img{
width: 100%; /* use this, or not */
margin: auto;
}

Tags:

CSS | Bootstrap

SQL Server TSQL DateDiff Between Weekdays Only

by 20. August 2015 07:04

declare @d1 datetime, @d2 datetime
select @d1 = '8/1/2015',  @d2 = '8/20/2015'

select datediff(dd, @d1, @d2) - (datediff(wk, @d1, @d2) * 2) -
       case when datepart(dw, @d1) = 1 then 1 else 0 end +
      case when datepart(dw, @d2) = 1 then 1 else 0 end

Tags:

SQL Server

Remove hiberfile.sys from Windows C: Drive

by 2. August 2015 09:46

Run CMD as administrator and run the following commands:

POWERCFG -X -hibernate-timeout-dc 0
POWERCFG -X -hibernate-timeout-ac 0
POWERCFG -H OFF

Tags: