Skip to content

Instantly share code, notes, and snippets.

View dagda1's full-sized avatar

Paul dagda1

View GitHub Profile
@dagda1
dagda1 / gist:1058112
Created July 1, 2011 08:47
backbone.coffeescript
class Observation extends Backbone.Model
class Observations extends Backbone.Collection
model: Observation
constructor: ->
@url = _observationsUrl
class ObservationView extends Backbone.View
initialize: ->
@dagda1
dagda1 / action.cs
Created July 11, 2011 08:51
Example controller actopm
[HttpGet]
public virtual C2JsonResult Edit(Guid uid)
{
var observation = _commonDao.GetByExpression<Observation>(x => x.Uid == uid);
var model = Mapper.Map<Observation, ObservationDto>(observation);
return new C2JsonResult{Data = model};
}
@dagda1
dagda1 / gemfile.rb
Created July 23, 2011 08:20
Jruby Assset Pipeline gist
source 'http://rubygems.org'
source 'http://gems.engineyard.com'
gem 'rails', '~> 3.1.0.rc4'
gem 'sass-rails'
gem 'compass', :git => 'https://github.com/chriseppstein/compass.git', :branch => 'rails31'
gem 'fancy-buttons'
gem 'haml'
gem 'authlogic', :git => 'https://github.com/AndreasWurm/authlogic.git'#, :branch => 'rails3'
gem 'nokogiri'
do($ = jQuery) ->
$.fn.extend
readonlyDocumentsTable: (options) ->
$("tbody > tr:first", @).prepend($("<th class=\"clicker\">&nbsp;</th>"))
$("tbody > tr", @).not(':first').each (index, ele) ->
row = $(ele)
span = $("<span class=\"expand hand\"><img alt=\"Show Reports\" src=\"/img/buttons/expand-plus.gif\"\/><\/span>")
td = $("<td class=\"hand tac\">")
@dagda1
dagda1 / gist:1147631
Created August 15, 2011 19:54
Jruby_Gemfile
source 'http://rubygems.org'
source 'http://gems.engineyard.com'
gem 'rails', '~> 3.1.0.rc5'
gem 'haml'
gem 'authlogic', :git => 'https://github.com/AndreasWurm/authlogic.git'#, :branch => 'rails3'
gem 'grid-coordinates'
gem 'nokogiri'
gem 'bundler'
gem 'resque'
@dagda1
dagda1 / gist:1148750
Created August 16, 2011 09:52
create_iis_5_site.ps1
function Set-FrameWorkVersion($strID)
{
$strPath = (Get-ChildItem Env:windir).Value + '\Microsoft.NET\Framework\'
$objDir = Get-ChildItem $strPath |
where { ($_.GetType().ToString().ToLower() -eq 'system.io.directoryinfo') -and
($_.name -match "^(v4.[\d\.]+)$")} |
sort name
if ($objDir -ne $null)
@dagda1
dagda1 / application.html.haml
Created September 7, 2011 08:10
application.html.haml
!!!
%head
%meta{:charset => "utf-8"}
%meta{:author => "Paul Cowan"}
%title Lead Generator
=stylesheet_link_tag "application"
=javascript_include_tag "application"
=csrf_meta_tags
%link{:rel => "stylesheet", :type => "text/css", :href => "http://fonts.googleapis.com/css?family=Orbitron:regular,italic,bold,bolditalic"}
%link{:rel => "stylesheet", :type => "text/css", :href => "http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic"}
@dagda1
dagda1 / header.html
Created September 7, 2011 08:48
header.html
<!DOCTYPE html>
<head>
<meta charset='utf-8'>
<meta author='Paul Cowan'>
<title>Lead Generator</title>
<link href="/assets/application.css" media="screen" rel="stylesheet" type="text/css" />
<script src="/assets/application.js" type="text/javascript"></script>
<meta content="authenticity_token" name="csrf-param" />
<meta content="CR1GfHUt+WWtrqwPVikWmNzXyEmPv1oRZqAKbCnobio=" name="csrf-token" />
<link href='http://fonts.googleapis.com/css?family=Orbitron:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
@dagda1
dagda1 / screen.sass
Created September 7, 2011 16:25
screen.sass
@import 'compass'
@include global-reset
@include reset-html5
@import 'partials/utilities'
@import 'partials/colors'
@import 'partials/typography'
@import 'partials/layout'
@import 'partials/header'
@import 'partials/navigation'
@dagda1
dagda1 / reset.html
Created September 7, 2011 19:51
reset.html
/* line 17, /Users/paulcowan/.rvm/gems/jruby-1.6.4/bundler/gems/compass-f23bf58e8db8/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,