Skip to content

Instantly share code, notes, and snippets.

@rickharris
rickharris / libgit2.rb
Last active February 6, 2017 18:36 — forked from nalanj/libgit2.rb
Homebrew formula for libgit2
class Libgit2 < Formula
desc "C library of Git core methods that is re-entrant and linkable"
homepage "https://libgit2.github.com/"
url "https://github.com/libgit2/libgit2/archive/v0.24.6.tar.gz"
sha256 "7b441a96967ff525e790f8b66859faba5c6be4c347124011f536ae9075ebc30c"
head "https://github.com/libgit2/libgit2.git"
option :universal
depends_on "pkg-config" => :build
<% bonus_videos = RecentClasses.bonus_content_videos(2) %>
<% bonus_videos.each do |video| %>
<div class="primary two-quarter <%= "last" if video == bonus_videos.last %>
<%= link_to(library_slug_url(:slug => video.slug), :class => "contained feature") do %>
<span class="flag flag-right">New</span>
<div class="flush">
<div class="hero-container">
<%= image_tag video.bonus_content_series.image_url %>
<%= image_tag cloudfront_signed_url("stills/" + video.still_image.to_s), :class => "video-thumb" %>
// This generates a duplicate selector
h1,
.h1 {
font-size: 24px; }
.fake-module {
.fake-header-1 {
@extend .h1; } }
// compiles to =>
h1,
@rickharris
rickharris / dry-with-sass-lists
Created December 12, 2011 17:53 — forked from ry5n/dry-with-sass-lists
Using Sass lists for DRY-er code
// Shared colors for buttons and alerts
//
// Use Sass lists to avoid writing out repeating patterns of Sass code.
//
// For example, the following avoids having to write out a selector and
// set of style rules for each alert type, when only class and
// variable names are different.
//
// Follows (and many thanks to) Nathan Weizenbaum (@nex3)’s comment at:
// http://groups.google.com/group/sass-lang/msg/987926ad9fe5ad43?
@rickharris
rickharris / vim_centos.sh
Created October 5, 2011 21:17 — forked from fundon/vim_centos.sh
install vim 7.3 on centos, debian, arch etc.
#!/bin/bash
# on centos minimal
yum install gcc
yum install make
yum install ncurses-devel
yum install ruby ruby-devel
yum install python python-devel
yum install perl perl-devel