This file contains 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
// FIX BOOTSTRAP CAROUSEL WHITE-SPACE BETWEEN SLIDES | |
.carousel-item { | |
transition: -webkit-transform 0.5s ease !important; | |
transition: transform 0.5s ease !important; | |
transition: transform 0.5s ease, -webkit-transform 0.5s ease !important; | |
-webkit-backface-visibility: visible !important; | |
backface-visibility: visible !important; | |
} |
This file contains 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
# view all running processes | |
ps aux | |
# kill a process | |
sudo kill <PID> | |
# edit SSH keys | |
cd ~/.ssh | |
nano authorized_keys |
This file contains 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
# add below to /etc/nginx/mime.types | |
application/x-font-ttf ttc ttf; | |
application/x-font-otf otf; | |
application/font-woff woff; | |
application/font-woff2 woff2; | |
application/vnd.ms-fontobject eot; | |
# add below to /sites/available/your-site | |
location ~* \.(eot|otf|ttf|woff|woff2)$ { | |
add_header Access-Control-Allow-Origin *; |
This file contains 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
# Ember breaks on refresh (404) | |
location / { | |
# First attempt to serve request as file, then | |
# as directory, then fall back to displaying a 404. | |
try_files $uri $uri/ =404; | |
# Uncomment to enable naxsi on this location | |
# include /etc/nginx/naxsi.rules | |
# Add the below rule to fix |
This file contains 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
# Reminder for me! How to configure PyCharm to use venv | |
- create virtual env as per usual via command line | |
- PyCharm > Preferences > Project / Project Interp. | |
- click cog > Add Local & and select Python from within local project bin | |
- Done! |
This file contains 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
# Fix Gunicorn socket with Nginx not working | |
# create a new gunicorn sock (for nginx) | |
https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04#create-a-gunicorn-systemd-service-file | |
# NGINX - make sure same sock so nginx can talk to Gunicorn! | |
upstream app_server { | |
server unix:/home/django/django_project/MyAPIName/mysockname.sock fail_timeout=0; | |
} |
This file contains 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
# update the location blocks try_files in your /sites-available/default | |
location / { | |
try_files $uri $uri/ /index.html$is_args$args; | |
} |
This file contains 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
# allow WP to FTP/access core/plugin folders | |
sudo chown -R www-data /var/www/html | |
# always set back when done | |
sudo chown -R sammy /var/www/html | |
# restart PHP on Ubuntu | |
sudo service php7.0-fpm restart |
This file contains 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
# UPDATE AWS EC2 SECURITY GROUPS FIRST TO ALLOW MySQL CONNECTION VIA IP | |
--- | |
# Edit /etc/mysql/my.cnf, and change the binding address to 0.0.0.0 | |
bind-address = 0.0.0.0 | |
# then restart mysql server | |
$ sudo /etc/init.d/mysql restart |
This file contains 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
# create the cert key request | |
openssl req -newkey rsa:2048 -nodes -keyout domain.com.key -out domain.com.csr | |
# concat the bundle and certs | |
cat domain_com.crt domain_com.ca-bundle > website-bundle.crt | |
# SSL checker for after install | |
https://www.sslshopper.com/ssl-checker.html |