Skip to content

Instantly share code, notes, and snippets.

View mcdave's full-sized avatar
🧑‍💻
How can I help you?

David Rodriguez mcdave

🧑‍💻
How can I help you?
View GitHub Profile
@bkeating
bkeating / howto-filemerge-git-osx.md
Created March 11, 2010 21:36
HOWTO: Using FileMerge (opendiff) with Git on OSX

HOWTO: Using FileMerge (opendiff) with Git on OSX

FileMerge (opendiff) can really come in handy when you need to visually compare merging conflicts. Other times it's just a nice visual way to review your days work.

The following method works by creating a simple bash script (git-diff-cmd.sh) that sets us up with the proper command line arguments for Git to pass off files to FileMerge.

# Don't compile the javascripts
compile '/javascripts/*/' do
nil
end
# Don't route the javascript that is compressed,
# otherwise route to a js file instead of an index.html
route '/javascripts/*/' do
if item[:compressed]
nil
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Nice Buttons</title>
<style>
* { margin: 0; padding: 0; }
ul {
padding: 20px;
width: 80px;
float: left;
// Proposed syntax: !remaining applied to the last positional argument becomes a
// comma list of any unbound positional arguments.
@mixin multi-shadow($shadows !remaining){
-moz-box-shadow: $shadows;
-webkit-box-shadow: $shadows;
-o-box-shadow: $shadows;
box-shadow: $shadows;
}
# using rvm with ruby-1.8.7-p249
# latest version 2.7.7 2010-06-17
brew install libxml2
# installing libxslt from source code
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
tar xvfz libxslt-1.1.26.tar.gz
cd libxslt-1.1.26
./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.7
@choan
choan / toc.html.erb
Created January 22, 2011 01:31
Recursive layout for generating nanoc menus
<% raise ArgumentError, "The @collection has no items to build the ToC." if @collection.empty? %>
<% @depth ||= -1 %>
<% @depth -= 1 if @depth > 0 %>
<% @reject ||= lambda { |x| false } %>
<% @sort_by ||= lambda { |x| x[:weight] || 0 } %>
<% @label ||= lambda { |x| x[:title] } %>
<% collection = @collection.reject(&@reject) %>
<% unless collection.empty? %>
<ul>
<% collection.sort_by(&@sort_by).each do |child| %>
/*
* timeago: a jQuery plugin ported to Zepto, version: 0.9.3 (2011-01-21)
* @requires Zepto.js 0.4
*
* Timeago is a jQuery plugin that makes it easy to support automatically
* updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
*
* For usage and examples, visit:
* http://timeago.yarp.com/
*
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@mirisuzanne
mirisuzanne / reference.mkdn
Created August 22, 2011 23:34
Susy 0.9 Reference Documentation

Susy 0.9 Reference Documentation

See the official Susy site for 1.0 documentation.

Terms

  • Susy Grid: A grid that you build with Susy. You can have multiple on one page if you need.
  • Grid Element: Any HTML element that is aligned to a Susy Grid.
  • Container: The root element in a Susy Grid. Anything inside it is a potential Grid Element.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }