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
## 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
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
# 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
# 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
# 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
alias contribs='git log | grep Author | sort | uniq' | |
alias csa='cap staging deploy:auto_migrate' | |
alias csd='cap staging deploy' | |
alias csdd='cap staging deploy:do_stuff' | |
alias mt='shopt -s extglob && mate !(@(cache|db|log|tmp|vendor|script))' | |
alias b="bundle" | |
alias bi="b install --path vendor" |
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
if (total_cantilever < ZepCalculationEngine::CONFLICT_ZONE) | |
left_cantilever = (total_cantilever + self.rafter_spacing) / 2 | |
if left_cantilever == 20.55 | |
puts "total cantilever: #{total_cantilever}" | |
puts "left cantilever: #{left_cantilever}" | |
puts "right cantilever: #{right_cantilever}" | |
puts "1st branch" | |
end | |
elsif (total_cantilever > (self.foot_spacing/3)*2) | |
left_cantilever = (total_cantilever - self.rafter_spacing) / 2 |
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
task "demo:deploy:prepare" do | |
# run our tests | |
out = `rake test` | |
unless out =~ /0 failures, 0 errors/ | |
raise "Oh Snap! A test seems to have failed! #{out}" | |
end | |
# remove old tag, this can fail and it is ok |
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
The MIT License (MIT) | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEA |