Skip to content

Instantly share code, notes, and snippets.

View cdmwebs's full-sized avatar
🦕

Chris Moore cdmwebs

🦕
View GitHub Profile

“What we’ve got here is a Failure to communicate…”

The Cincinnati startup web development community sucks.

At least that’s the feeling we walked away with after reading an article posted March 11, 2012 by Laura Baverman on Cincinnati.com’s EnterChange blog. The article holds some credible facts, but not necessarily inevitable conclusions. The end result of her observations seems a little flawed. Cincinnati can sustain not only talented coders and designers; it already does. Absolutely, lots of local talent will go elsewhere to seek employment and opportunities, but plenty have stayed because they recognize the potential right here in the Queen City. Sure it’s risky joining a startup vs. an established corporation, but if recent history has shown us anything, at least we know the future always involves risk. We’re traditionally an exceptionally conservative city, but in times like these, risk is best placed where your heart lay. Passion and commitment are what drives business. What better way to focus

@cdmwebs
cdmwebs / friendly_urls.markdown
Created September 11, 2011 15:50 — forked from jcasimir/friendly_urls.markdown
Friendly URLs in Rails

Friendly URLs

By default, Rails applications build URLs based on the primary key -- the id column from the database. Imagine we have a Person model and associated controller. We have a person record for Bob Martin that has id number 6. The URL for his show page would be:

/people/6

But, for aesthetic or SEO purposes, we want Bob's name in the URL. The last segment, the 6 here, is called the "slug". Let's look at a few ways to implement better slugs.

@cdmwebs
cdmwebs / losangeles.craigslist.org.js
Created August 25, 2011 22:26 — forked from ajsharp/losangeles.craigslist.org.js
Craigslist live filtering
// Adds a live filter box to the results screen on craigslist
// that filters the results that are currently on the page by
// the search term. Like Cmd-F, but better.
// NOTE: Requires dotjs.
if (window.location.pathname.match(/\/search\//) && !$('body').html().match(/Nothing found for that search/)) {
var searchHash = window.location.hash,
searchString = searchHash.split("/")[1],
filterResults = {},
=gradient-bg($color, $top: 5, $bottom: $top)
@if $top < 0 and $bottom < 0
$color1: darken($color, abs($top))
$color2: lighten($color, abs($bottom))
+linear-gradient(color-stops($color1, $color2))
@else
$color1: lighten($color, abs($top))
$color2: darken($color, abs($bottom))
+linear-gradient(color-stops($color1, $color2))
background-color: $color
require 'httparty'
require 'grit'
require 'pathname'
module Wikipedia
class Revision
def initialize(article, revision)
@article = article
@revision = revision
#!/usr/bin/env ruby
#-*-ruby-*-
# A script to run ctags on all .rb files in a project. Can be run on
# the current dir, called from a git callback, or install itself as a
# git post-merge and post-commit callback.
CTAGS = '/usr/local/bin/ctags'
HOOKS = %w{ post-merge post-commit post-checkout }
HOOKS_DIR = '.git/hooks'