Skip to content

Instantly share code, notes, and snippets.

@jccovey
jccovey / jQuery Masonry Layout Plugin
Created May 28, 2010 17:45
jQuery Masonry Layout Plugin
http://desandro.com/resources/jquery-masonry/
http://desandro.com/mint/pepper/tillkruess/downloads/tracker.php?url=http://github.com/desandro/masonry/raw/master/js/jquery.masonry.min.js&remote
Configuring Masonry is fairly easy. Simply attach the .masonry() method to the wrapping container element in your jQuery script. Depending on the layout, you’ll most likely need to specify one option.
For layouts with elements that span multiple widths:
$('#wrapper').masonry({ columnWidth: 200 });
http://www.devcurry.com/2010/06/collection-of-free-programming-and.html
http://www.smashingmagazine.com/2010/06/10/50-new-useful-css-techniques-tools-and-tutorials/
http://thestonesoup.com/blog/images/free_stonesoup_ecookbook.pdf
http://danieltenner.com/posts/0018-how-to-lose-weight.html
http://ud.com/
http://www.webuiarchitect.com/tips-building-wireframes-for-web-ui
@jccovey
jccovey / web
Created June 16, 2010 03:20 — forked from schmidt/web
Serve current directory on next available port
#!/usr/bin/env ruby
require 'webrick'
require 'socket'
require 'timeout'
# code from http://stackoverflow.com/questions/517219/ruby-see-if-a-port-is-open/517638#517638
def port_in_use?(port)
begin
@jccovey
jccovey / config.ru
Created July 9, 2010 02:34 — forked from toolmantim/config.ru
Rack::File, but serves directories, too
# Rackup file for serving up a static site from a "public" directory
#
# Useful for chucking a static site on Heroku
class IndexRewriter
def initialize(app) @app = app end
def call(env)
env["PATH_INFO"].gsub! /\/$/, '/index.html'
@app.call(env)
end
# Import a posterous.com Blog into nanoc (http://nanoc.stoneship.org)
# Uses Nokogiri to parse the XML data from the posterous API
require 'rubygems'
require 'nanoc3'
require 'nokogiri'
require 'open-uri'
module Nanoc3::Extra
module Importers
@jccovey
jccovey / Monadic Parser Combinators.html
Created November 26, 2010 23:20
Paper by Graham Hutton and Erik Meijer
<html>
<head>
<title>Monadic Parser Combinators</title>
<meta name="source" content="http://www.cs.nott.ac.uk/~gmh/monparsing.pdf" />
</head>
<body>
<h1>Monadic Parser Combinators</h1>
<ul>
<li></li>
</ul>
@jccovey
jccovey / HarvestDates.py
Created December 20, 2011 00:21
Sublime Text 2 plugin to find and copy all timestamps to a scratch buffer
import sublime, sublime_plugin
class HarvestDates(sublime_plugin.TextCommand):
def run(self, edit):
date_matches = self.view.find_all("\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{2} (am|pm)")
date_buffer = self.view.window.new_file()
date_buffer.insert(0, 0, date_matches)
@jccovey
jccovey / Links from work - April 2012.txt
Created May 4, 2012 21:40
Links from work - April 2012
@jccovey
jccovey / file_manager_ideas.md
Created June 5, 2012 02:58
Ideal GUI File Manager for Modern OSes

Ideal File Manager for Modern OSes

Interface

Tabbed, no menu bar, tool bar unique to each tab with following:

  1. Back button (cds to popd dir off stack)
  2. Foward button (cds to last popd dir off stack)
@jccovey
jccovey / cmd-pattern.md
Created July 2, 2012 19:05
"CMD" Pattern

Quoting scrame in a comment on a "MOVE" design pattern as proposed (http://cirw.in/blog/time-to-move-on/ ):

In Java/Spring-MVC, there is a typical class hierarchy of Controller -> Manager/Service -> DAO. The extra level of indirection is a very handy place to put business logic, then each class in the tier has a dedicated function:

  • Controller - Parses input, delegates the action and returns the response (rendered by the view).
  • Manager - Handles sanitized data, encapsulates business logic and makes calls into the Model / Data layer.
  • DAO - Interfaces with the data store, makes sure only good data goes in, and appropriate responses are returned.

(via http://news.ycombinator.com/item?id=4190037)