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
NOTE! This requires Bash v4.x |
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
#!/usr/bin/env bash | |
readonly PROGRESS_BAR_WIDTH=25 | |
readonly PROGRESS_BAR_STEP_CHAR='#' | |
echo "Processing..." | |
for i in $(seq ${PROGRESS_BAR_WIDTH}); do | |
steps=$(printf "${PROGRESS_BAR_STEP_CHAR}%.0s" $(seq $i)) | |
formatted=$(printf "%-${PROGRESS_BAR_WIDTH}s" ${steps}) |
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
#!/usr/bin/env bash | |
# Enable strict error handling | |
set -u -o pipefail | |
# Define our hostname formats | |
readonly HOSTNAME_FORMAT="%s.my-service-name.environment-name" | |
readonly FQDN_HOSTNAME_FORMAT="%s.service.example.com" | |
# Get the current hostname |
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
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"regexp" | |
"time" | |
) |
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
#!/usr/bin/env bash | |
readonly ACCESS_TOKEN="" | |
readonly IDS=( | |
1 | |
2 | |
3 | |
) | |
for id in ${IDS[@]}; |
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
#!/usr/bin/env sh | |
# NOTE! This requires the "Sift" tool, GNU "sed", and Go (Golang) | |
# | |
# https://sift-tool.org/ | |
# https://github.com/svent/sift | |
# https://www.gnu.org/software/sed/ | |
# https://golang.org/ | |
# https://golang.org/cmd/go/#hdr-Show_documentation_for_package_or_symbol |
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
#!/usr/bin/env bash | |
./configure --prefix=/usr/local --with-features=huge --enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-cscope [email protected] |
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
package main | |
import ( | |
"fmt" | |
"unicode/utf8" | |
) | |
const strangeMessage = "TᕼIᔕ ᗰᕮᔕᔕᗩGᕮ Iᔕ ᑭᖇOTᕮᑕTᕮᗪ ᗷY ᗩ ᔕᑭᕮᑕIᗩᒪ ᖴOᑎT. IT'ᔕ IᗰᑭOᔕᔕIᗷᒪᕮ TO ᑕOᑭY IT. TᖇY ᗩᑎᗪ YOᑌ ᗯIᒪᒪ ᖴᗩIᒪ" | |
func main() { |
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
<?php | |
// The location of the Unicode CLDR "windowsZones" mappings here | |
const XML_URL = 'http://unicode.org/cldr/data/common/supplemental/windowsZones.xml'; | |
const XML_ZONE_MAP_XPATH = '/supplementalData/windowsZones/mapTimezones/mapZone'; | |
const ZONE_TERRITORY_ATTRIBUTE = 'territory'; | |
const ZONE_IANA_NAME_ATTRIBUTE = 'type'; | |
const ZONE_WINDOWS_NAME_ATTRIBUTE = 'other'; |
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
<?php | |
// The location of the EWS WSDL here (Office365 here for example) | |
const WSDL_URL = 'https://outlook.office365.com/EWS/Services.wsdl'; | |
const NAMESPACE_WSDL_PREFIX = 'wsdl'; | |
const NAMESPACE_WSDL_URI = 'http://schemas.xmlsoap.org/wsdl/'; | |
const NAMESPACE_SOAP_PREFIX = 'soap'; | |
const NAMESPACE_SOAP_URI = 'http://schemas.xmlsoap.org/wsdl/soap/'; |