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
// Automatic Copy Constructor provides an automatic copy constructor for our class if we do not provide a custom one. | |
// The automatic copy constructor will copy the contents of all member variables. | |
/* Custom Copy Constructor must: | |
- be a Class constructor | |
- have exactly one argument which must be a const reference of the same type as the class | |
eg: Cube::Cube(const Cube & obj) the '&' means passed by reference */ | |
/* Copy constructors are often invoked automatically: |
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
1. in manifest.js: //= link mycustom.css | |
2. uncomment gem "sassc-rails" in Gemfile | |
3. application.html.erb: <%= stylesheet_link_tag "mycustom", "data-turbo-track": "reload" %> | |
4. mycustom.css write your own styles | |
5. rails assets:clobber | |
6. rails assets:precompile | |
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
#With this, Wizard has no attribute 'email' because we already have a constructor in Wizard. Constructor of parent class (super) is not getting inherited: | |
class User(object): | |
def __init__(self, email): | |
self.email = email | |
def sign_in(self): | |
print('logged_in') | |
class Wizard(User): |
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
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/ |
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
// define a method by putting the function after a property in an object: | |
let me = { | |
'name' : '', | |
getGreeting: function() { | |
return `Hi, my name is ${this.name}.` | |
} | |
} | |
me.name = 'Mary' | |
console.log(me.getGreeting()); | |
>Hi, my name is Mary. |
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
# >> is the append operator. if no file exists it will create one; thic configures the .gemrc file to skip the installation of Ruby documentation | |
echo "gem: --no-document" >> ~/.gemrc | |
# to ensure it is created: | |
cat ~/.gemrc | |
# install rails | |
gem install rails -v 6.x.x | |
# install Bundler with a specific version number |
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
#devise_for :users | |
devise_for :users, :controllers => {registrations: 'users/registrations', :confirmations => "users/confirmations", sessions: 'users/sessions', :omniauth_callbacks => "users/omniauth_callbacks"} |
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
Perfect Crispy Keto Wings | |
• 4# wing sections | |
• 2 Tbsp Baking Powder | |
• 1/4 Tbsp Salt | |
• 1.5 Tbsp Onion Powder | |
• 1.5 Tbsp Garlic Powder | |
• 3/4 Tbsp Paprika | |
• 1/4 Tbsp Cayenne | |
Rack and sprinkle both side generously then refrigerate at least 4 hours to pull any moisture out, longer the better. | |
Bake 275° for 30 minutes (You can freeze extra wings for another day at this point if needed) |
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
# Math | |
https://www.programiz.com./python-programming/modules/math |
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
echo | |
echo | |
echo | |
echo 'done yet?' | |
echo 'nope' | |
echo | |
echo | |
echo | |
OlderNewer