Simple overview of use/purpose.
An in-depth paragraph about your project and overview of use.
| #!/bin/bash | |
| sudo apt update -y && sudo apt upgrade -y | |
| sudo apt install zip unzip certbot python3-certbot-nginx software-properties-common -y | |
| # AWS | |
| sudo apt install awscli -y | |
| # Remove Apache, Install NGINX | |
| sudo systemctl stop apache2 && sudo systemctl disable apache2 | |
| sudo apt remove apache2 -y |
| apt-get update | |
| apt-get upgrade | |
| apt install -y nginx | |
| systemctl enable nginx | |
| systemctl start nginx | |
| apt-add-repository ppa:ondrej/php -y | |
| systemctl enable php7.4-fpm | |
| systemclt start php7.4-fpm | |
| apt install -y php7.4 php7.4-{cli,gd,curl,mysql,ldap,zip,fileinfo,fpm,xml,mbstring,exif,pspell,imagick,bcmath} | |
| apt install mariadb-server mariadb-client |
| /* Use case: returning pdf as blob from XHR request, | |
| for example when the endpoint is secure and needs an Authorization header | |
| NB: responseType on fetch for blobData has to be "blob". | |
| PDF files are not UTF-8, they are binary, so otherwise fonts won't appear properly | |
| */ | |
| const showFile = (blobData, reportName) => { | |
| // Adapted from: https://blog.jayway.com/2017/07/13/open-pdf-downloaded-api-javascript/ | |
| const fileName = reportName && `${ reportName }.pdf` || 'myreport.pdf'; |
| <?php | |
| /* | |
| * Place this with the rest of your rules. | |
| * Doesn't need to be in an array as there are no pipes. | |
| * Password is required with a minimum of 6 characters | |
| * Should have at least 1 lowercase AND 1 uppercase AND 1 number | |
| */ | |
| $rules = [ | |
| 'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/' | |
| ]; |
| 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 |
People
:bowtie: |
π :smile: |
π :laughing: |
|---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |
| /* | |
| Some simple Github-like styles, with syntax highlighting CSS via Pygments. | |
| */ | |
| body{ | |
| font-family: helvetica, arial, freesans, clean, sans-serif; | |
| color: #333; | |
| background-color: #fff; | |
| border: none; | |
| line-height: 1.5; | |
| margin: 2em 3em; |