Skip to content

Instantly share code, notes, and snippets.

@skys215
skys215 / connectivity_check.sh
Created July 10, 2022 04:52
Check connectivity and show notification(MacOS)
#!/bin/bash
# Define domains to be checked
Domains=(http://example1.com https://example2.com)
# Title of Notification
TITLE="Site connectivity check"
# Sound are in /System/Library/Sounds
SOUND="Glass"
@skys215
skys215 / shell
Created July 10, 2022 03:56
Check SSL expiry and show notification
#!/bin/bash
# Domains to be checked
Domains=(example1.com example2.com)
# Port
Port="443"
# Show notification before n days before expiration
NoticeBeforeDays="30"
@skys215
skys215 / sh
Created July 23, 2021 15:01
A shell script to quickly change npm/composer mirror
#!/bin/bash
# Variable
# Template #
# Always end with a space
# COMMAND_COMPOSER_GLOBAL="composer config -g repos.packagist composer "
# Always end with a space
# COMMAND_COMPOSER_LOCAL="composer config repo.packagist composer "
# The command to reset to default repository globally
# COMMAND_COMPOSER_RESET_GLOBAL="composer config -g --unset repos.packagist"