Skip to content

Instantly share code, notes, and snippets.

View cadwallion's full-sized avatar
⚒️
Building all the things

Andrew Nordman cadwallion

⚒️
Building all the things
View GitHub Profile
module Namespace
class Address < ActiveRecord::Base
include Namespace::AddressMethods
end
end
===
module Namespace
class MailingAddress < ActiveRecord::Base
require 'work_queue'
wq = WorkQueue.new(5)
i = 1
%w{foo bar baz bun}.each do |file|
i2 = i
wq.enqueue_b do
#move file to another directory
ImportFile.new(file, i2).run
end
@cadwallion
cadwallion / beer_menu.thor
Created May 15, 2012 18:50
Ruck beer list scraper
#!/usr/bin/env ruby
# A Thor-based commandline tool for all BeerMenu.
# Based on @jsteiner's Ruby equivalent of @jlet's Python Ruck
# beer list scraper
# @jsteiner's Original: https://gist.github.com/2703889
# @jlet's Original: ttps://gist.github.com/2659721
require 'open-uri'
require 'nokogiri'
require ['media-uploader'], (MediaUploader) ->
class Rise.Views.Teach.Lessons.UploadContentModal extends MediaUploader.UploadModal
el: '#upload-modal'
FILE_TYPES:
'Content::Document': ['pdf']
'Content::Media': ['video', 'audio']
initialize: ->
setDefaults()