Skip to content

Instantly share code, notes, and snippets.

View SimonRice's full-sized avatar

Simon Rice SimonRice

View GitHub Profile
@SimonRice
SimonRice / CarPlaySceneDelegate.swift
Created November 14, 2020 17:51
CarPlay Open In Maps Example
import CarPlay
final class CarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate {
func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController) {
}
}
@SimonRice
SimonRice / httpd-vhosts.conf
Last active January 3, 2016 02:59
My useful Symfony virtual hosts file - covers Symfony 1 & 2 - means every subdirectory becomes a virtual host, leaving you just to put an entry in your hosts file.
Listen 80
NameVirtualHost *:80
<virtualhost *:80>
ServerName sf1.dev
ServerAlias *.sf1.dev
UseCanonicalName Off
VirtualDocumentRoot "/Users/simon/Developer/SF1Projects/%1/web"
<directory "/Users/simon/Developer/SF1Projects/*/web">
@SimonRice
SimonRice / webshims-turbolinks.js.coffee
Created June 18, 2013 18:18
Enable WebShims to work with Turbolinks
@SimonRice
SimonRice / SSISLogProvider.cs
Created January 24, 2013 18:45
Log4Net + SSIS = Log4SSIS
using System;
using log4net;
using Microsoft.SqlServer.Dts.Runtime;
namespace Log4SSIS
{
public class SSISLogProvider : LogProviderBase
{
protected ILog _Log = LogManager.GetLogger("SSIS");
@SimonRice
SimonRice / Connection.php
Created December 28, 2011 15:52
PDO DBLIB divers for Doctrine (ideal for UNIX-based servers connecting to MS SQL Server)
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
@SimonRice
SimonRice / RenderActionPartial.spark
Created December 28, 2011 15:22
Utility class to render MVC Partials & Actions in Webforms (or server side controls)
<viewdata ControllerName="string" />
<viewdata ActionName="string" />
<viewdata RouteValues="object" />
# Html.RenderAction(ActionName, ControllerName, RouteValues);
@SimonRice
SimonRice / SpringButtonPluginConfig.cs
Created December 22, 2011 16:06
Immediacy 6.x Control & Server-Side Button Plugin Configuration with Spring.NET support
using System;
using System.Web.UI;
using Immediacy.Web.UI.Design;
using Spring.Context;
using Spring.Context.Support;
using Spring.Web.Support;
namespace Immediacy.Spring
{
public abstract class SpringButtonPluginConfig : ButtonPluginConfig, ISupportsWebDependencyInjection
@SimonRice
SimonRice / jquery.jDoubleSelect.js
Created September 16, 2011 14:56
A modified version of jDoubleSelect 0.3, altered to work jQuery 1.6.4 on optgroups with spaces
/*
* jDoubleSelect jQuery plugin
*
* Copyright (c) 2010 Giovanni Casassa (senamion.com - senamion.it)
*
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://www.senamion.com
*