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
// The following formula can be used to verify the ABN. | |
// To verify an ABN: | |
// 1. Subtract 1 from the first (left) digit to give a new eleven digit number | |
// 2. Multiply each of the digits in this new number by its weighting factor | |
// 3. Sum the resulting 11 products | |
// 4. Divide the total by 89, noting the remainder | |
// 5. If the remainder is zero the number is valid | |
isValidABN(value: string) :boolean { | |
var weights : number[] = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19]; |
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
cat ~/.ssh/id_rsa.pub | ssh user@host "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys" |