Skip to content

Instantly share code, notes, and snippets.

View soderberg's full-sized avatar

Brent Soderberg soderberg

  • Sports Technologies LLC
  • Collinsville, CT
View GitHub Profile
@soderberg
soderberg / markdown-buttons
Last active October 7, 2016 07:06
Markdown button for a textarea using Twitter Bootstarp 3 icons, haml, and javascript https://www.dropbox.com/s/nmt0yrwlohdx80g/form-with-markdown-button.png
.form-group
= f.label :text, :class => "control-label"
.row
.col-xs-12
#markdown-tools
.tool
%span.glyphicon.glyphicon-bold(title="Bold")
.tool
%span.glyphicon.glyphicon-italic(title="Italics")
.tool
@soderberg
soderberg / visiblescroll.js
Created March 14, 2012 04:42
JS to keep a div visible in window when scrolling
/*******************************
* This is a snippet of code using JQuery to keep
* a 120 x 600 ad vidible when scrolling the window.
*******************************/
var ads = {
gutterad : function(){
$(window).scroll(function(){
var ht = $(window).height();
var tp = $(window).scrollTop();
@soderberg
soderberg / compass_rails_311.txt
Created November 16, 2011 14:57
Using Compass with Rails 3.1.1 Asset Pipeline
To get compass working with asset pipeline Rails 3.1.1, there were a few things that you need to do
that may are not well documented.
1. Point compass to the github source in your Gemfile to get version 0.12.alpha instead of 0.11.5.
Gemfile example
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
@soderberg
soderberg / .bashrc
Created October 29, 2011 06:14
My customized bash terminal prompt config
PS1='\[\033[00;34m\]\u\[\033[00;00m\][\[\033[00;32m\]\W\[\033[00;00m\]]\$'