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 | |
| YELLOW="\\033[1;33m" | |
| RED="\\033[0;31m" | |
| NC="\\033[0m" | |
| PARENT_DIR=$(pwd) | |
| find "$PARENT_DIR" -type d -name ".git"| while read -r line; do | |
| TARGET_FOLDER=$(cd "$line/.." || exit; pwd) | |
| TARGET_FOLDER_NAME=$(basename "$TARGET_FOLDER") |
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
| import Data.List (partition) | |
| import Control.Arrow ((***)) | |
| idValidate n = (length ds == 11) && check1 && check2 | |
| where ds = map (\x -> read [x] :: Int) (show n) | |
| (o, e) = map snd *** map snd $ partition (\(x,_)->odd x) $ zip [1..9] ds | |
| check1 = ds !! 9 == (sum o * 7 - sum e) `mod` 10 | |
| check2 = ds !! 10 == sum (init ds) `mod` 10 |
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
| # Change YOUR_TOKEN to your prerender token | |
| # Change http://example.com (at the end of the last RewriteRule) to your website url | |
| <IfModule mod_headers.c> | |
| RequestHeader set X-Prerender-Token "YOUR_TOKEN" | |
| </IfModule> | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On |