Skip to content

Instantly share code, notes, and snippets.

@jonezy
jonezy / HtmlHelpers.cs
Created May 11, 2011 20:46
Helpers for MVC projects (rob conery would recognize these)
using System.Web.Routing;
using System.Web.Mvc.Html;
namespace System.Web.Mvc {
public static class HtmlHelpers {
static string BaseUrl { get { return HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) + VirtualPathUtility.ToAbsolute("~/"); } }
static string publicDirectory = VirtualPathUtility.ToAbsolute("~/") + "public";
static string scriptDirectory = "javascript";
@jonezy
jonezy / ServiceBase.cs
Created August 30, 2011 19:03
Base class for subsonic data access files, just inherit this class (rename the db type to match your own), provide the subsonic entity type. Has deps on subsonic and richmondday.helpers
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CollectBruceLee;
using CollectBruceLee.Data;
using RichmondDay.Helpers;
@jonezy
jonezy / _vimrc
Created February 27, 2012 17:52
My Windows _vimrc
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
colorscheme zenburn
" CD to c:\dev\
:cd c:\dev\
@jonezy
jonezy / _gvimrc
Created February 27, 2012 17:52
MY windows _gvimrv
" Font
set guifont=Consolas:h9.00
" No audible bell
set vb
" No toolbar
set guioptions-=T
@jonezy
jonezy / gist:2140860
Created March 20, 2012 20:17
jQuery plugin boilerplate
// jQuery Plugin Boilerplate
// A boilerplate for jumpstarting jQuery plugins development
// version 1.1, May 14th, 2011
// by Stefan Gabos
(function($) {
$.pluginName = function(element, options) {
var plugin = this;
plugin.settings = {}
@jonezy
jonezy / configu.ru
Created March 25, 2012 21:45
Config.ru for static site on heroku.com
# put this file in the root of a foler, then put index, c and j in ./public and deploy to heroku
use Rack::Static,
:urls => ["/stylesheets", "/images"],
:root => "public"
run lambda { |env|
[
200,
{
@jonezy
jonezy / gist:2295324
Created April 3, 2012 20:38
update all git repos in a folder
for d in `/bin/ls -d */src`; do cd $d; ECHO;pwd; git status; cd ../../; done
@jonezy
jonezy / .slate
Created November 22, 2012 17:26
Slate config
# This is the default .slate file.
# If no ~/.slate file exists this is the file that will be used.
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Resize Bindings
bind right:alt resize +5% +0
bind left:alt resize -5% +0
@jonezy
jonezy / startconfig.bat
Created December 18, 2012 18:56
Launches the visual studio web server w/ the MINI Configurator. Then opens chrome and navigates to the local site.
start "" "C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0\WebDev.WebServer40.exe" /port:3900 /path:"C:\dev\RichmondDay\MiniConfigurator\src\MiniConfigurator.Api"
rundll32 url.dll,FileProtocolHandler http://localhost:3900
taskkill /IM WebDev.WebServer40.exe
taskkill /IM chrome.exe
C:\dev\RichmondDay\KioskDataExporter\KioskDataExporter\LeadGenExporter\bin\Release\DataExporter.exe