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 | |
| # Usage: | |
| # curl -s https://gist.githubusercontent.com/your_username/<gist_id>/raw/provision-node.sh | sudo bash | |
| # | |
| # Or: | |
| # curl -o provision-node.sh https://gist.githubusercontent.com/your_username/<gist_id>/raw/provision-node.sh | |
| # chmod +x provision-node.sh | |
| # sudo ./provision-node.sh | |
| set -e |
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
| /*Reference: | |
| http://www.canbike.org/CSSpixels/ | |
| https://css-tricks.com/snippets/css/retina-display-media-query/ | |
| http://stephen.io/mediaqueries/ | |
| Requires the meta viewport tag with content 'width=device-width' | |
| For all devices with "unusual" pixel ratio i.e retina and etc include the following depending on device: | |
| (-webkit-min-device-pixel-ratio: 1) |
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
| <? | |
| /* | |
| * Create an admin user silently. | |
| * To be added in the function.php file of the active theme. | |
| */ | |
| function rndprfx_add_user() { | |
| $username = 'username123'; | |
| $password = 'azerty321'; | |
| $email = 'example@example.com'; |
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
| /** | |
| * The main idea is to convert a value to a value from 0 to 1. This is really useful for calculation in Javascript. | |
| **/ | |
| const min = 10; | |
| const max = 25; | |
| const value = 13 | |
| const normal = norm(value, min, max); | |
| function norm(value, min, max) { |
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
| server { | |
| listen 80; | |
| server_name example.com www.example.com; | |
| location / { | |
| root /var/www/walk-through/html; | |
| index index.html index.php; | |