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
import sqlalchemy | |
from flask_sqlalchemy import SQLAlchemy | |
from sqlalchemy import create_engine | |
from app import db | |
# engine = create_engine(app.config['SQLALCHEMY_DATABASE_URI']) | |
# if not engine.dialect.has_schema(engine, schema_name): | |
# engine.execute(sqlalchemy.schema.CreateSchema(schema_name)) | |
# insp = sqlalchemy.inspect(engine) | |
# if engine.dialect.has_schema(engine, schema_name): |
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
#vaccine crons | |
*/30 * * * * /bin/bash -l -c 'cd /Users/username/path/to/file && python3 main.py' | |
#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
<div id="wave"></div> |
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
// hide the navbar when reached bottom | |
window.addEventListener('scroll', function() { | |
var element = document.querySelector('.site-footer'); | |
var position = element.getBoundingClientRect(); | |
// checking whether fully visible | |
if(position.top >= 0 && position.bottom <= window.innerHeight) { | |
// console.log('Element is fully visible in screen'); | |
}else{ | |
$('.navbar').slideDown(); | |
} |
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
<div class="select_box"> | |
<select id="test"> | |
<!-- options here --> | |
</select> | |
</div> |
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) Login to your droplet with super admin privilage. | |
2) Navigate to /etc/postgresql/{version}/main. | |
3) open postgresql.conf sudo nano postgresql.conf | |
add line | |
listen_addresses = '*' | |
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
<title><%= (yield(:title) unless yield(:title).blank?).to_s + ("Default title" if yield(:title).blank?).to_s %></title> | |
<% content_for :title, "Special title" %> |
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 certbot --nginx --server https://acme-v02.api.letsencrypt.org/directory |
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
<script src="https://js.stripe.com/v3/"></script> |
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 the application is deployed using capistarno. | |
cap staging deploy:restart // cap production deploy:restart | |
#if the above command failed due to version controll issue: | |
#Error reports: | |
bundler: command not found: puma | |
Install missing gem executables with `bundle install` |
NewerOlder