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
#!/bin/bash | |
directory="company-reposts-2024" | |
files_directory="/<location>/$directory" | |
final_directory="/<location>/$directory" | |
# Create the destination directory if it doesn't exist | |
mkdir -p "$files_directory" | |
# Move to the directory containing the .xls files |
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
RewriteEngine On | |
# Force HTTPS redirection | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
# If an existing asset or directory is requested go to it as it is | |
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR] | |
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d | |
RewriteRule ^ - [L] | |
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
# docker compose | |
alias dcbuild='docker-compose build' | |
alias dcup='docker-compose up' #start all containers | |
alias dcdown='docker-compose down' #stop all contailers | |
alias dcrails='docker-compose run app rails' #run rails commands e.g. "dcrails db:migrate" | |
alias dctest='docker-compose run app rails test' #run tests | |
alias dcre='docker-compose down && docker-compose up' #stop and then re-start all containers | |
# debugs | |
alias dcdebug='docker-compose up -d && docker attach $(docker-compose ps -q app)' |
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
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |