Skip to content

Instantly share code, notes, and snippets.

Shane Pinnell shanepinnell

Block or report user

Report or block shanepinnell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ard_installcheck.sh
#!/bin/sh
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki export PATH
# this will run as a munki install_check script
# exit status of 0 means install needs to run
# exit status not 0 means no installation necessary
# adapted scripts from here: https://jamfnation.jamfsoftware.com/discussion.html?id=1989
View gist:1975644
class PostsController < ActionController::Base
def create
Post.create(post_params)
end
def update
Post.find(params[:id]).update_attributes!(post_params)
end
private
@jnx
jnx / rbenv-install-system-wide.sh
Created Oct 1, 2011
rbenv install and system wide install on Ubuntu 10.04 LTS.
View rbenv-install-system-wide.sh
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
@purcell
purcell / application_helper.rb
Created Sep 9, 2011
Make will_paginate generate HTML that bootstrap.less will render nicely
View application_helper.rb
# Based on https://gist.github.com/1182136
class BootstrapLinkRenderer < ::WillPaginate::ActionView::LinkRenderer
protected
def html_container(html)
tag :div, tag(:ul, html), container_attributes
end
def page_number(page)
tag :li, link(page, page, :rel => rel_value(page)), :class => ('active' if page == current_page)
You can’t perform that action at this time.