Skip to content

Instantly share code, notes, and snippets.

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

Greg Tangey Ruxton

🎹
🍣🎸🥁🎺🎺
View GitHub Profile
module Apathy
extend ActiveSupport::Concern
def care_factor
0
end
end
class Dan
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"
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
$(function(){
FRONTIER_REGEX = /^\/thefrontiergroup\//;
INBOX_GITHUB = /^\/inbox\/notifications/;
if(window.location.pathname.match(INBOX_GITHUB)){
var actions, button, markasread;
markasread = $('.list .minibutton');
button = $('<button>');
def edit
if current_user.vetter?
if @mission.vet.nil?
@mission.start_vetting
@mission.build_vet
end
end
end
it do
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]
# rc: Rails console
alias rc="rails c"
# debugme: touch tmp/debug.txt
alias debugme="touch tmp/debug.txt"
# rgm: Generate rails migrations
function rgm() {
local fileopener file
@Ruxton
Ruxton / gist:3292990
Created August 8, 2012 07:07
Get original facebook avatar
## I have a member class, it has a method on it called facebook, you will also need the user_photos permission
#
# def facebook
# @facebook ||= Koala::Facebook::API.new facebook_auth.credentials.token if facebook?
# end
#
##
user=User.last
@Ruxton
Ruxton / how_to.rb
Created November 16, 2012 02:26 — forked from osiro/how_to.rb
How to make caipirinha
def name_of_the_drink ingredients
case ingredients
when 'cachaça + lime + ice + sugar'
return 'Caipirinha'
when 'cachaça + juice + sugar'
return 'Batida'
when 'cachaça + cashew'
return 'Caju Amigo'
when 'cachaça + water + sugar + orange||lime + cloves + cinnamon + ginger'
return 'Quentão'
20:29:15 T:139663440447360 NOTICE: -----------------------------------------------------------------------
20:29:15 T:139663440447360 NOTICE: Starting XBMC (12.0 Git:ae08a23), Platform: Linux (Ubuntu 12.04.2 LTS, 3.2.0-36-generic x86_64). Built on Jan 29 2013
20:29:15 T:139663440447360 NOTICE: special://xbmc/ is mapped to: /usr/share/xbmc
20:29:15 T:139663440447360 NOTICE: special://xbmcbin/ is mapped to: /usr/lib/xbmc
20:29:15 T:139663440447360 NOTICE: special://masterprofile/ is mapped to: /home/ruxton/.xbmc/userdata
20:29:15 T:139663440447360 NOTICE: special://home/ is mapped to: /home/ruxton/.xbmc
20:29:15 T:139663440447360 NOTICE: special://temp/ is mapped to: /home/ruxton/.xbmc/temp
20:29:15 T:139663440447360 NOTICE: The executable running is: /usr/lib/xbmc/xbmc.bin
20:29:15 T:139663440447360 NOTICE: Local hostname: Rogue
20:29:15 T:139663440447360 NOTICE: Log File is located: /home/ruxton/.xbmc/temp/xbmc.log