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
gem 'will_paginate' | |
gem "font-awesome-rails" | |
gem "paperclip", "~> 5.0.0" | |
gem 'devise', '~> 4.2' | |
gem 'colorbox-rails' | |
gem 'awesome_print' | |
gem 'paypal-recurring' | |
gem 'rpush' | |
gem 'active_record_union' | |
gem 'entity_storage' |
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
bundle exec rails webpacker:install:react | |
# then add | |
<%= javascript_pack_tag 'application' %> | |
# then on command line: | |
bundle exec rails generate react:install | |
# then to create first react component: | |
rails g react:component HelloWorld greeting:string |
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
let bridges = ['Brooklyn', 'Golden Gate', 'London']; | |
function logUpperCase(string) { | |
console.log(string.toUpperCase()); | |
} | |
bridges.forEach(logUpperCase); | |
// example 1 | |
function whosASpecial(anArrOfPets) { |
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
Heap memory allows us to create memory independent of the lifecycle of a function. Heap memory starts at low addresses and grows up. | |
the only way to create heap memory in C++ is with the NEW operator/keyword. | |
the new operator returns a POINTER to the memory storing the data - not an instance of the data itself. | |
new always does 3 things: | |
[1] allocates memory on the heap for the data structure | |
[2] initializes the data structure | |
[3] returns a pointer to the start of the data structure |
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
Capybara.register_driver :chrome_headless do |app| | |
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( | |
'goog:chromeOptions': { | |
args: %w[ no-sandbox headless disable-gpu --window-size=1920,1080] | |
} | |
) | |
Capybara::Selenium::Driver.new(app, browser: :chrome, desired_capabilities: capabilities) | |
end | |
#Ensure Log directory exists |
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
https://gist.github.com/theoretick/6033200 |
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
gem 'devise', '~> 4.4.3' |
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 defaultGreet(first, last) { | |
// if (last !== undefined) { | |
// return 'Hi ' + first + ' ' + last + '!'; | |
// } else { | |
// last = ' Doe!'; | |
// return 'Hi ' + first + last; | |
// } | |
// } | |
// defaultGreet('Jane'); |
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
// on local server: | |
brew services restart mariadb | |
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
name = 'Johnny' | |
age = 55 | |
print(f'hi {name}. You are {age} years old') #preferred way in python 3 | |
print('hi {0}. You are {1} years old'.format('Johnny', '55')) #old way | |
print('hi {new_name}. You are {age} years old'.format(new_name='sally', age=100)) | |
hi Johnny. You are 55 years old |