Skip to content

Instantly share code, notes, and snippets.

View beaucollins's full-sized avatar
🃏
Special Author

Beau Collins beaucollins

🃏
Special Author
View GitHub Profile
rgba(255,255,255,0.2);
}
#header {
background:#333;
background: -webkit-linear-gradient(#595959, #1D1D1D);
border:none;
box-shadow: 0 0 5px #000;
#sr-header-area {
background: none;
border-bottom:1px solid rgba(0,0,0,0.2);
box-shadow: 0 1px 0 rgba(255,255,255,0.1);
color: #666;
}
#sr-header-area a {
color: #999;
}
@beaucollins
beaucollins / rmls.css
Created September 1, 2011 15:21
Put crests in the header
/* ===== Crest Links in Header ===== */
.usertext {
position:static;
}
.usertext-body a[href="/r/chicagofire"],
.usertext-body a[href="/r/chivasusa"],
.usertext-body a[href="/r/coloradorapids"],
.usertext-body a[href="/r/TheMassive"],
@beaucollins
beaucollins / gist:1502825
Created December 20, 2011 19:19 — forked from Ravenna/gist:1502681
routes
# resources :recommendations, :has_many => :approvals
resources :recommendations, :shallow => true do
resources :approvals
end
<%= form_for @recommendation, :html => { :multipart => true} do |f| %>
<% if @recommendation.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@recommendation.errors.count, "error") %> prohibited this recommendation from being saved:</h2>
<ul>
<% @recommendation.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
<script type="text/javascript">
$(document).ready(function() {
$('#next_approver_email_field').toggle();
$('#approval_checked').click(function() {
$('#next_approver_email_field').show();
});
});
</script>
@beaucollins
beaucollins / gist:6628528
Last active December 23, 2015 11:29 — forked from Ravenna/gist:6616431
// FADEOUT THE LOADING GRAPHIC AFTER WAITING 1 SEC
function fadeSpinner(complete){
$('.delay-spinner').delay(1000).fadeToggle(500, 'easeOutQuart', complete);
}
// FADEIN THE CONTENT
function fadeInContent(type){
$('.ps-item-content .'+type+'').fadeToggle(700, 'easeInQuart');
}
var fadeSpinnerType = function(){
/**
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class Md5Util {
public static String hex(byte[] array) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < array.length; ++i) {
sb.append(Integer.toHexString((array[i]
& 0xFF) | 0x100).substring(1,3));