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
# ***************************************************************************** | |
# Functions: | |
# ***************************************************************************** | |
# runs the full mergesort algorithm on the inputted array | |
def mergesort(inarr) | |
results = [] | |
arrsize = inarr.size |
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 subclasses really aren't pretty... I had major issues with | |
# getting the subclasses access to the instance variables @c and | |
# @f so they could run the in_celsius and in_fahrenheit methods. | |
class Temperature | |
def initialize t | |
@f = t[:f] | |
@c = t[:c] | |
#puts "initialized!!! t = #{t.inspect}, @f is #{@f.inspect} and @c is #{@c.inspect}" |
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
# Testing whether TestChild is going to be able to modify TestParent's | |
# string1 and array1, or, overall, which objects are really pass-by-reference | |
# and which are not [in this case, testing strings and arrays] | |
class TestParent | |
attr_accessor :string1, :array1 | |
def initialize(string1, array1) | |
@string1 = string1 | |
@array1 = array1 | |
puts | |
puts "The parent's starting string is: #{@string1}" |
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
#Deploy and rollback on Heroku in staging and production | |
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
namespace :deploy do | |
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU' | |
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU' | |
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag] | |
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on] |
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
// These settings can be found under Sublime Text 2 >> Preferences >> Settings - User | |
// You can just copy-paste this file right over whatever was there if you want | |
// | |
// Check out the file at Sublime Text 2 >> Preferences >> Settings - Default | |
// to see what options are available for you | |
{ | |
"color_scheme": "Packages/Color Scheme - Default/LAZY.tmTheme", | |
"font_size": 14.0, | |
"ignored_packages": |
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
> sudo npm install | |
> [email protected] install /Users/eriktrautman/Documents/NEARStudio/node_modules/fsevents | |
> node install | |
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz | |
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v67 ABI, unknown) (falling back to source compile with node-gyp) | |
gyp ERR! clean error | |
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build' | |
gyp ERR! System Darwin 17.7.0 |