This file contains hidden or 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
# This file is auto-generated from the current state of the database. Instead of editing this file, | |
# please use the migrations feature of Active Record to incrementally modify your database, and | |
# then regenerate this schema definition. | |
# | |
# Note that this schema.rb definition is the authoritative source for your database schema. If you need | |
# to create the application database on another system, you should be using db:schema:load, not running | |
# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations | |
# you'll amass, the slower it'll run and the greater likelihood for issues). | |
# | |
# It's strongly recommended to check this file into your version control system. |
This file contains hidden or 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
# Prompt Setup | |
function minutes_since_last_commit { | |
now=`date +%s` | |
last_commit=`git log --pretty=format:'%at' -1` | |
seconds_since_last_commit=$((now-last_commit)) | |
minutes_since_last_commit=$((seconds_since_last_commit/60)) | |
echo $minutes_since_last_commit | |
} | |
git_prompt() { |
This file contains hidden or 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
# MacPorts Bash shell command completion | |
if [ -f /opt/local/etc/bash_completion ]; then | |
. /opt/local/etc/bash_completion | |
fi |
This file contains hidden or 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
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
function proml { | |
local BLUE="\[\033[0;34m\]" | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" | |
local LIGHT_GREEN="\[\033[1;32m\]" |
This file contains hidden or 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
## Array Virtualization | |
### General Rules | |
Calculate based on a normalized MountingArray and SolarArray | |
* This will be the base x and y coordinates with no missing panels | |
* Everything is calculated in Landscape and flipped 90deg for Portrait | |
Represent the MountingArea in the codebase | |
Represent the SystemComponents in the codebase | |
Build SolarArray based on MountingVariables (minus the footing) |
This file contains hidden or 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
var PANEL_WIDTH = 5.2; | |
var PANEL_HEIGHT = 2.5; | |
var PANEL_SPACING = 0.5; | |
function MountingArea(width, height) { | |
this.width = width; this.height = height; | |
this.solar_array = new SolarArray(width, height) | |
} | |
function SolarArray(width, height) { |
This file contains hidden or 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
Laying out the Solar Array | |
========================== | |
1) Component Awareness | |
---------------------- | |
Components need to know about each other so that rules can be kept, | |
an calculations can be made based on the inter-connectedness of the | |
array as a whole of pieces. | |
To accomplish this I am going to make components a lot smarter then |
This file contains hidden or 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
Solar Array Layout | |
================== | |
Legend | |
------ | |
+-- measurements -----------------------+ | |
| RS Rafter Spacing | | |
| | | |
|-- zones ------------------------------| |
This file contains hidden or 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 Riot | |
Riot.reporter = Riot::VerboseStoryReporter | |
class Reporter | |
def initialize | |
@passes = @failures = @errors = 0 | |
@failing_stories = @erroring_stories = [] | |
@current_context = "" | |
end | |
This file contains hidden or 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 initialize( points, rafter_spacing, region ) | |
self.points = points | |
ensure_points_are_geo_ruby_points | |
ensure_at_least_3_points | |
self.region = region | |
self.rafter_spacing = rafter_spacing | |
self.polygon = Polygon.from_points( [self.points] ) |