Skip to content

Instantly share code, notes, and snippets.

View Ruxton's full-sized avatar
🎹
🍣🎸🥁🎺🎺

Greg Tangey Ruxton

🎹
🍣🎸🥁🎺🎺
View GitHub Profile
PetrescueAdmin::Application.routes.draw do
devise_for :users
root to: redirect("/users/sign_in")
resources :groups, only: [:new, :create, :show]
get 'rescue_directory' => 'groups#index'
get 'rescue_directory/:state' => 'groups#list_by_state'
resources :listings, only: [:index]
def edit
if current_user.vetter?
if @mission.vet.nil?
@mission.start_vetting
@mission.build_vet
end
end
end
it do
$(function(){
FRONTIER_REGEX = /^\/thefrontiergroup\//;
INBOX_GITHUB = /^\/inbox\/notifications/;
if(window.location.pathname.match(INBOX_GITHUB)){
var actions, button, markasread;
markasread = $('.list .minibutton');
button = $('<button>');
class Diablo3
def self.pick_my_class(option1,option2)
options = []
18.times do
options.push(option1)
options.push(option2)
end
options.push('QUIT LIFE')
options.shuffle!
# puts options.sample
jQuery ($) ->
$('#add-user').on 'click', (e) ->
userId = $('#group_user_id').val()
groupId = $('#group_id').val()
data =
group_id : groupId
user_id : userId
$.post "/admin/group_users", data, (data)->
if data == "error"
module Apathy
extend ActiveSupport::Concern
def care_factor
0
end
end
class Dan
module Apathy
extend ActiveSupport::Concern
def care_factor
0
end
end
class Dan
@Ruxton
Ruxton / driver.rb
Created March 6, 2012 07:37 — forked from osiro/driver.rb
class Driver
....
after_destroy :set_new_current_driver_to_insurance_detail
protected
def set_new_current_driver_to_insurance_detail
@insurance_detail = self.insurance_detail
@insurance_detail.update_attribute(:current_driver, @insurance_detail.drivers.first) if @insurance_detail.drivers.any? and @insurance_detail.current_driver_id == self.id
#
#Usage
#
#$ __selector "Select a volume" "selected_volume" "" "`ls -la /Volumes/`"
#$ cd $selected_volume
#
# __selector: good for selecting stuff
function __selector() {
local selections selPrompt selCurrent selListCommand selSize choose
@Ruxton
Ruxton / itms.js
Created August 15, 2011 03:19
Blocks clicks in them itms link maker, re-creates metadata and captures output
$('a.link').unbind( 'click' );
$('a.link').bind( 'click', function(event) {
event.preventDefault();
event.stopPropagation();
var f = this.className.replace(/(\s|^)link(\s|$)/, "");
this.mediaType = f.substr(0, 1).toUpperCase() + f.substr(1);
if (this.mediaType == "Artist") {
this.linkText = $(this).prevAll("h5").text() + " (Artist)";