Skip to content

Instantly share code, notes, and snippets.

View jparker's full-sized avatar

John Parker jparker

View GitHub Profile
=SUM(FILTER('Worksheet name'!D2:D; 'Worksheet name'!E2:E="food"))
$ defaults write com.apple.finder AppleShowAllFiles TRUE
$ killall Finder
$ defaults write com.apple.finder AppleShowAllFiles FALSE
$ killall Finder
<!-- day.html.haml -->
<h1>Billables | Daily</h1>
<%= render :partial => 'billables' %>
<!-- week.html.haml -->
<h1>Billables | Weekly</h1>
<%= render :partial => 'billables' %>
<!-- month.html.haml -->
<h1>Billables | Monthly</h1>
<!-- day.html.haml -->
<h1>Billables | Daily</h1>
<table>
<thead><%= render :partial => 'head' %></thead>
<tfoot><%= render :partial => 'foot' %></tfoot>
<tbody><%= render :partial => @billables %></tbody>
</table>
<!-- week.html.haml -->
<h1>Billables | Weekly</h1>
Autotest.add_hook :initialize do |at|
at.add_exception 'vendor'
nil
end
Autotest.add_hook :initialize do |at|
at.add_exception %r{^vendor/}
nil
end
<%= f.label :payment_sent_on %>
<span id="payment_sent_on">
<%= f.date_select :payment_sent_on, :include_blank => true %>
<%= link_to_remote 'Today', :url => billable_payment_sent_on_today_path, :update => 'payment_sent_on' %>
</span>
def payment_sent_on_today
@billable = Billable.new(:payment_sent_on => Date.today)
render :update do |page|
page.replace_html :payment_sent_on,
:inline => "<%= date_select :billable, :payment_sent_on, :include_blank => true %>"
end
end
end
<%= f.label :payment_sent_on %>
<%= f.date_select :payment_sent_on, :include_blank => true %>
<%= link_to 'Today', '#', :id => 'payment_sent_on_today' %>