Skip to content

Instantly share code, notes, and snippets.

View kcargile's full-sized avatar
🏃‍♂️
Building something rad

Kristopher Cargile kcargile

🏃‍♂️
Building something rad
View GitHub Profile
@azsromej
azsromej / archives.html
Created March 7, 2012 18:19
Jekyll generator plugin to group posts by month for archives page
---
layout: default
title: Archives
---
<h1>{{ page.title }}</h1>
<div class="archives">
{% for month in page.months %}
<h2>{{ month | date:"%B" }} <small>{{ month | date:"%Y" }}</small></h2>
<ul>
{% for post in page.posts_by_month[month] %}
@haf
haf / gist:2843680
Created May 31, 2012 14:19
Get SSH working on Vagrant/Windows/Git

If you are using vagrant, you probably-statistically are using git. Make sure you have its binary folder on your path, because that path contains 'ssh.exe'.

Now, modify C:\vagrant\vagrant\embedded\lib\ruby\gems\1.9.1\gems\vagrant-1.0.3\lib\vagrant\ssh.rb to comment out the faulty Windows check and add a real SSH check:

# if Util::Platform.windows?
  # raise Errors::SSHUnavailableWindows, :host => ssh_info[:host],
                                       # :port => ssh_info[:port],
                                       # :username => ssh_info[:username],
 # :key_path =&gt; ssh_info[:private_key_path]
@florisrobbemont
florisrobbemont / Boot code
Created June 20, 2013 10:58
Umbraco Controllers factories (IObjectFactory is a wrapper for my Windsor container. Use any other IoC technology you want)
public void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
FilteredControllerFactoriesResolver.Current.InsertType<UmbracoFilteredControllerFactory>(0);
DependencyResolver.SetResolver(new WindsorDependencyResolver(Application.ObjectFactory));
GlobalConfiguration.Configuration.Services.Replace(typeof(IHttpControllerActivator), new WindsorCompositionRoot(Application.ObjectFactory));
}