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
#!/usr/bin/bash | |
declare -a repos=( | |
"$HOME/Projects/myproject/testing/.git" | |
"$HOME/Projects/myproject/testing-bundle/.git" | |
"$HOME/Projects/myproject/service-skeleton/.git" | |
"$HOME/Projects/myproject/documentation-web/.git" | |
"$HOME/Projects/myproject/documentation-api/.git" | |
"$HOME/Projects/myproject/coding-standard/.git" | |
"$HOME/Projects/myproject/context/microservice1/.git" |
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
function UuidFromBinary(binary) { | |
const bytes = new Uint8Array(binary.length); | |
for (let i = 0; i < bytes.length; i++) { | |
bytes[i] = binary.charCodeAt(i); | |
} | |
let result = ''; | |
for (let i = 0; i < bytes.length; i++) { | |
result += (bytes[i] & 0xFF).toString(16).padStart(2, '0'); | |
} |
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
<?php | |
/** | |
* Spintax - A helper class to process Spintax strings. | |
* @name Spintax | |
* @author Jason Davis - https://www.codedevelopr.com/ | |
* Tutorial: https://www.codedevelopr.com/articles/php-spintax-class/ | |
* Modified by Mark Larsen: | |
* Added ability so that a fixed output can be returned. | |
* Modified by David Strencsev: | |
* Refactor and regular expression lazy optimization. |
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
/** | |
* Swedish rounding $nearest | |
* | |
* @param float $num | |
* @param float $nearest | |
* @return float | |
*/ | |
function roundcent($num, $nearest = .05){ // default 5 cent | |
return round($num / $nearest) * $nearest; | |
} |
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
/** | |
* Encode positive integers as upper case (ASCII) letters | |
* Encodes 0 as A, 25 as Z, 26 as AA, 51 as AZ, 52 as BA, 701 as ZZ, 702 as AAA... and so on | |
* @param int $int | |
* @return string | |
*/ | |
function int2letters($int) { | |
$letters = ''; |