Curl retry mechanism

The following statement will retry 5 times or a maximum of 40 seconds with a connection timeout of 5 seconds, and no exponential backoff policy curl –connect-timeout 5 \ –max-time 10 \ –retry 5 \ –retry-delay 0 \ –retry-max-time 40 \ ‘http://your_url’ –max-time 10 (how long each retry will wait) –retry 5 (it will retry … Read more

How can I programmatically stop or start a website in IIS (6.0 and 7.0) using MsBuild?

By adding a reference to Microsoft.Web.Administration (which can be found inX:\Windows\System32\inetsrv, or your systems equivalent) you can achieve nice managed control of the situation with IIS7, as sampled below: namespace StackOverflow { using System; using System.Linq; using Microsoft.Web.Administration; class Program { static void Main(string[] args) { var server = new ServerManager(); var site = server.Sites.FirstOrDefault(s … Read more

jQuery – Sticky header that shrinks when scrolling down

This should be what you are looking for using jQuery. $(function(){ $(‘#header_nav’).data(‘size’,’big’); }); $(window).scroll(function(){ if($(document).scrollTop() > 0) { if($(‘#header_nav’).data(‘size’) == ‘big’) { $(‘#header_nav’).data(‘size’,’small’); $(‘#header_nav’).stop().animate({ height:’40px’ },600); } } else { if($(‘#header_nav’).data(‘size’) == ‘small’) { $(‘#header_nav’).data(‘size’,’big’); $(‘#header_nav’).stop().animate({ height:’100px’ },600); } } }); Demonstration: http://jsfiddle.net/jezzipin/JJ8Jc/

How can I deploy Symfony in a subdirectory?

Here I wrote exactly about that: https://www.refactory-project.com/install-symfony-app-in-a-subfolder-of-an-existing-site/ Upload the application part Start by uploading the application folders at the same level of your site root: [ftproot] — public_html —- … —- … — symfonyapp —- app —- bin —- src —- vendor —- web —— app.php —— app_dev.php —— … —- composer.json —- composer.lock Move … Read more

MSBuild target package not found

I just got this working without installing VS2010 by following these steps on the build server: If .NET Framework 4 isn’t installed, install it Install the Web Deployment tool from http://www.iis.net/download/webdeploy From the C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0 folder on your dev machine copy the “Web” and “Web Applications” folders to the equivalent directory on your build server. … Read more

Bootstrap grid with fixed wrapper – Prevent columns from stacking up

The sm,md,lg,etc.. cols wrap/stack responsively. Use the non-stacking col-xs-* class… <div class=”container”> <div class=”row”> <div class=”col-xs-4″>.col-4</div> <div class=”col-xs-4″>.col-4</div> <div class=”col-xs-4″>.col-4</div> </div> </div> Demo: http://bootply.com/80085 EDIT: Bootstrap 4, the xs no longer needs to be specified.. <div class=”container-fluid”> <div class=”row”> <div class=”col-4″>.col-4</div> <div class=”col-4″>.col-4</div> <div class=”col-4″>.col-4</div> </div> </div>

allowDefinition=’MachineToApplication’ error when publishing from VS2010 (but only after a previous build)

i had the same problem with my MVC apps. it was frustrating because i still wanted my views to be checked, so i didn’t want to turn off MvcBuildViews luckily i came across a post which gave me the answer. keep the MvcBuildViews as true, then you can add the following line underneath in your … Read more