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
const fs = require('fs'); | |
const AWS = require('aws-sdk'); | |
// Enter copied or downloaded access id and secret here | |
const ID = ''; | |
const SECRET = ''; | |
// Enter the name of the bucket that you have created here | |
const BUCKET_NAME = 'test-bucket-1248847363334'; |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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
const compareSemanticVersions = (a: string, b: string) => { | |
// 1. Split the strings into their parts | |
const a1 = a.split('.'); | |
const b1 = b.split('.'); | |
// 2. Contingency in case there's a 4th or 5th version | |
const len = Math.min(a1.length, b1.length); | |
// 3. Look through each version number and compare. | |
for (let i = 0; i < len; i++) { | |
const a2 = +a1[ i ] || 0; | |
const b2 = +b1[ i ] || 0; |