Skip to content

Instantly share code, notes, and snippets.

View eiwi1101's full-sized avatar

William Eisert eiwi1101

View GitHub Profile
@eiwi1101
eiwi1101 / encabulator.rb
Created March 11, 2016 17:38
Some examples on how to interface with various Rockwell Automation products.
class RetroEncabulator < RockwellAutomation::Base
end
class TurboEncabulator < RetroEncabulator
has_one :reverse_duractance_wheel, inverse_of: :duractance_wheel
end
@eiwi1101
eiwi1101 / sassify.rb
Created November 30, 2015 18:07
Enumerates the SASS variables in your Rails app, and searches for places they can be used.
#!/usr/bin/ruby
#
# Needs work, feel free to contribute.
# Dependencies: ANSI color escapes, spits out vim commands.
#
# USAGE
# ./sassify.rb list
# ./sassify.rb [files...]
#
# list - Command which lists all loaded SASSY variables.
@eiwi1101
eiwi1101 / some_view.html.haml
Last active November 21, 2015 00:45
A table helper file for HAML templates that allows you to make tables of a data collection painfully easy.
%h1 All Users
- table_for User.all do
- column "Username" => :username
- column "Email" => ->(m) { mail_to m.email }
- column "Notes" => :notes