This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Table < ActiveRecord::Base | |
self.table_name = "magi.tables" | |
has_many :headers | |
#--------------------------------------------------------------------------------------------------# | |
def self.generate | |
@tables = Table.select([:id, :source_database, :current_name, :magi_name]) | |
@headers = Header.select([:id, :table_id, :current_name, :magi_name]) #refactor to call this in the loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'thor' | |
require 'thor/actions' | |
class App < Thor | |
include Thor::Actions | |
end | |
@run = App.new | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module GC | |
def self.count_objects_by_class | |
@@runs ||= [] | |
run = Hash.new 0 | |
@@runs << run | |
# Count objects of each class. | |
ObjectSpace.each_object do |obj| | |
run[obj.class.name.to_sym] += 1 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pitch(angle) | |
a = angle.degrees_to_radians | |
@velocity = Matrix[[Math::cos(a), -Math::sin(a)], [Math::sin(a), Math::cos(a)]] * @velocity | |
end | |
def pitch_up; pitch 3; end | |
def pitch_down; pitch -3; end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compile '/images/screenshots/*/', rep: :thumbnail do | |
filter :thumbnailize, factor: 0.25 | |
end | |
route '/images/screenshots/*/', rep: :thumbnail do | |
item.identifier.chop + '-thumbnail.' + item[:extension] | |
end | |
------------------- | |
# layouts/screenshot.html.haml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Relapse::Builders::OsxApp | |
+ [32masserts folder_suffix is equal to "OSX"[0m | |
+ [32masserts icon= with arguments(s): ["test_app.ico"] raises Relapse::ConfigError with message /icon must be a .icns file/[0m | |
+ [32mdenies gemspecs is empty[0m | |
Relapse::Builders::OsxApp no wrapper | |
+ [32masserts generate_tasks raises Relapse::ConfigError with message /wrapper not set/[0m | |
Relapse::Builders::OsxApp invalid wrapper | |
+ [32masserts generate_tasks raises Relapse::ConfigError with message /wrapper not valid/[0m | |
Relapse::Builders::OsxApp no url | |
+ [32masserts generate_tasks raises Relapse::ConfigError with message /url not set/[0m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Keywords: Ruby, Application, Package, Release, Standalone | |
ReleasePackager - A bit wordy and bland. I want a memorable word/pun/acronym | |
Crate/Box/Luggage - all sorts of "package" type words are taken. | |
RelApps - Same as Relapse. | |
Relapse - too many negative connotations | |
LUMP => Lump is the Ultimate Multi-platform Packager | |
RUMP => Ruby's Ultimate Multi-platform Packager (rump exists: https://bitbucket.org/sterlingcamden/rump) | |
RASP => Ruby Application Standalone Packager | |
SAP StandaloneApplicationPackager. Sadly SAP is used by webby geezers. |

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
always do | |
on :mouse_press do | |
@clicked_card = @deck.cards.find { |card| card.received_click?(mouse_pos) } | |
end | |
on :mouse_release do | |
@clicked_card = nil | |
end | |
@clicked_card.drag(mouse_pos) if @clicked_card |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading site data... | |
Compiling site... | |
Removing draft pages... | |
delete /games/alpha_channel/releases/v1_2_5_draft/ | |
delete /games/hoops/releases/v1_0_0_draft/ | |
Creating tags... | |
generate /tags/zed-and-ginger/ | |
generate /tags/game/ | |
generate /tags/ray/ |