Skip to content

Instantly share code, notes, and snippets.

module PublicHelper
include Twitter::Autolink
def display_tweets(team)
html_content = []
@tweets = Tweet.where(:team_hash => team).limit(10).order_by([[:created_at, :desc]])
@tweets.each do |tweet|
html_content << content_tag(:li, :class => 'group') do
"<img src='"+tweet.profile_image_url+"' />"
content_tag(:div, :class => 'post') do
"<h3> " + auto_link_usernames_or_lists("@#{tweet.username}") + " <span>" + tweet.name + "</span>" + "</h3>" + "<p>" + tweet.text + "</p>"
/******************************************
Misc/Hacks/Clears/Groups */
/* Clears for floats */
.clear {
clear: both;
display: block;
overflow: hidden;
visibility: hidden;
import flash.display.MovieClip;
import flash.events.MouseEvent;
rotate360.addEventListener(MouseEvent.ROLL_OVER, onRollOverHandler);
rotate360.addEventListener(MouseEvent.ROLL_OUT, onRollOutHandler);
rotateButton.addEventListener(MouseEvent.ROLL_OVER, onRollOverHandler);
rotateButton.addEventListener(MouseEvent.ROLL_OUT, onRollOutHandler);
rotate360.buttonMode = true;
@procload
procload / sexy-button.scss
Created August 24, 2011 14:47
Compass/SASS Sexy Button Mixin
/* Create a custom mixing for a sexy button */
@mixin sexy-button($color, $font-color) {
color: $font-color;
font-family: $secondary-font-family;
font-weight: bold;
font-size: 12px;
padding: .75em 1em;
text-decoration: none;
position: relative;
border: 1px solid rgba(0,0,0,.1);
#siteNav {
background: #FFF;
@include clearfix;
border: {
style: solid;
color: $header-border-color;
top: {
width: 1px;
}
bottom: {
# Compress JavaScripts and CSS
config.assets.compress = true
config.assets.digest = false
<%= content_tag :li, :class => 'first' do %>
<%= link_to('Personal Info', edit_user_path(current_user)) %>
<% end %>
#glances {
@include prepend(1);
@include column(7, last);
background: #ebebeb;
border-right: 1px solid #cfcfcf;
padding-top: 24px;
font-family: $secondary-font-family;
> section {
@include append(.5);
> header {
<section class="messageFooter">
<% if touchpoint.updated_at != touchpoint.created_at %>
Updated by <%= touchpoint.updated_by %> at <time datetime="<%= touchpoint.updated_at.to_formatted_s(:dashy_format_verbose) %>"><%= touchpoint.updated_at.to_formatted_s(:human_readable_verbose) %></time>
<% else %>
Created by <%= touchpoint.created_by %> at <time datetime="<%= touchpoint.created_at.to_formatted_s(:dashy_format_verbose) %>"><%= touchpoint.created_at.to_formatted_s(:human_readable_verbose) %></time>
<% end %>
</section>
#Dismiss sign-up message, for now
$(".dismiss-sign-up").click (e) ->
e.preventDefault()
console.log($(this).parent().parent())
$(this).fadeOut