Skip to content

Instantly share code, notes, and snippets.

View johnmaxwell's full-sized avatar

John Maxwell johnmaxwell

  • Atlanta, GA
View GitHub Profile
class EventsController < ApplicationController
before_filter :authenticate_user!
def index
end
def show
@event = Event.find_by_id(params[:id])
end
@johnmaxwell
johnmaxwell / hide-inline-images.js
Created February 16, 2012 16:35 — forked from starzonmyarmz/hide-inline-images.js
A userscript for Flowdock that adds a button next to inline elements like Tweets and Images that allows you to hide them. Really useful to hide annoying animated gifs and hubot pug bombs
// originally from: https://gist.github.com/1649063
$(function () {
if (window.fluid) {
setInterval(function(){
$('.image-preview-wrapper').not('.hideBtnAdded').each(function() {
var t = $(this);
if (t.find('.hideImg').length === 0) {
t.append('<button class="hideImg">Hide This Image</button>');
def upload_sizing
result = {:export => {use: []}}
if uploads_enabled?
dims = (upload_width? && upload_height?) ? { width: upload_width, height: upload_height } : nil
dims_thumb = (upload_thumb_width? && upload_thumb_height?) ? { width: upload_thumb_width, height: upload_thumb_height } : nil
if enable_images?
if dims
result[:resize] = dims