Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am bval on github.
  • I am bval (https://keybase.io/bval) on keybase.
  • I have a public key ASBVGZa6mqaEm6-TIpHeo_CY6ulru8dopQnAX-mvPqW2gwo

To claim this, I am signing this object:

@bval
bval / .htrouter.php
Created February 19, 2013 21:33
This is a router for Drupal and other PHP apps that rely on mod_rewrite rules for "clean URLs" so that those same apps can be run under PHP 5.4's built-in webserver which doesn't support mod_rewrite.
<?php
/**
* @file
* The router.php for clean-urls when use PHP 5.4.0 built in webserver.
*
* Usage:
*
* php -S localhost:3000 .htrouter.php
*
*/
@bval
bval / _visit.html.erb
Created September 12, 2012 22:42 — forked from wnstn/_visit.html.erb
data being passed in
<div class="outcome-section graph-container">
<h3 class="boxed-header">Overall Progress <%= records.last.integer_value %></h3>
<h3 class="boxed-header">Goal <%= ogoal.goal %></h3>
<div style="height:300px;" class="graph" data-scale="<%= ogoal.scale.min %>-<%= ogoal.scale.max %>" data-goal="<%= ogoal.goal %>" data-coordata="<%= records.to_a.map { |r| "#{r.progress_report.due_date.to_time.to_i*1000}|#{(r.integer_value)}" }.join(",") %>">
</div>
</div>
@bval
bval / gist:3164255
Created July 23, 2012 15:32
Nashville Software School Mentor Breakfast
Time: breakfast starts at 8am, meeting starts at 8:30, we'll be done by 9:30am - if you can't get there at 8 come when you can.
Date: Tuesday, 24 July
Location: Railyard Studios
429 Chestnut Street, Studio C
Nashville, TN 37203
We are meeting at Railyard Studio's new workshop and showroom on Chestnut Street in Nashville. Many of you know Robert Hendricks and know about the great furniture that Railyard Studios designs and builds. Well, come join us and meet all of our great students from Nashville Software School plus see Railyard's new workshops and see a selection of their award-winning work. It's a craftsmanship mashup - software school meets Railyard Studios. The pure intellectual craftsmanship of slinging bits to make useful and beautiful code meeting great craftsmanship in building stuff out of atoms of wood and iron. Actually Railyard uses slightly larger pieces of wood and iron than individual atoms, but you the drift. Check out some of Railyard's work at their website: www.railyardstudios.com
@bval
bval / gist:2239660
Created March 29, 2012 16:42
HTML Salutations
<select name="salutation" size="1">
<option value="">
-- please make a selection --
</option>
<option value="Admiral">
Admiral
</option>
<option value="Ambass. &amp; Mrs.">
[ ["-71", "-49"], ["-47", "-37"], ["-73"] ] =returns=> [ ["-71", "-47", "-73"] ["-71", "-37", "-73"] ["-49", "-47", "-73"] ["-49", "-37", "-73"] ]
or
[
["-71", "-49"],
["-47", "-37"],
["-73"]
]
returns
[
it "fails" do
fail "hey buddy, you should probably rename this file and start specing for real"
end
class ApplicationController < ActionController::Base
protect_from_forgery
private
def current_user_session
@current_user_session ||= UserSession.find
end
def current_user
current_user_session && current_user_session.user
<?php
/**
* Department form.
*
* @package skeleton
* @subpackage form
* @author Your name here
* @version SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
sfGuardUser:
sgu_admin:
username: admin
password: Client2009
is_super_admin: true
cwage:
username: cwage
password: changeme
first_name: Chris
last_name: Wage