These steps are for a Linux instance. Similar operations can be peformed on Windows, but I haven't administered Windows machines for about 10 years. So, some research is required for that.
- Examine the processes running on the instance
ps aux| // We support the GET, POST, HEAD, and OPTIONS methods from any origin, | |
| // and allow any header on requests. These headers must be present | |
| // on all responses to all CORS preflight requests. In practice, this means | |
| // all responses to OPTIONS requests. | |
| const corsHeaders = { | |
| "Access-Control-Allow-Origin": "*", | |
| "Access-Control-Allow-Methods": "GET,HEAD,POST,OPTIONS", | |
| "Access-Control-Max-Age": "86400", | |
| } |
| # This configuration can be used to create a reverse proxy for use with Figment's DataHub service | |
| # | |
| # This file can be included by placing it into /etc/nginx/sites-enabled/ (Debian based distros) | |
| # or /etc/nginx/conf.d/ (Red Hat based distros) | |
| server { | |
| # The proxy will listen on port 80 (SSL is not enabled) | |
| listen 80; | |
| # Replace EXAMPLE with the DataHub service name |
| <?php | |
| $slackWebhookUrl = "https://hooks.slack.com/services/this/comes/from/slack/after/setting/up/a/webhook"; | |
| $slackChannel = 'molly'; | |
| // Keeps trying to get the IP address for 20 times | |
| $retries = 0; | |
| $ipAddress = null; | |
| while(empty($ipAddress) && $retries < 20) { | |
| $ipAddress = exec("ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/'"); |
| /** | |
| * Set email signature on provided email addresses | |
| * To ensure signatures have been successfully updated, follow the steps below: | |
| * | |
| * 1. Add comma-separated email addresses (example: '[email protected]', '[email protected]', '[email protected]') | |
| * 2. Navigate to Run > setAllSignatures | |
| * 3. Navigate to View > Logs | |
| * 4. View log output "Signature successfully updated for [email address]" | |
| */ | |
| function setAllSignatures() { |
I hereby claim:
To claim this, I am signing this object:
| SELECT CONCAT(ROUND(sum(length(column_name)) / ( 1024 * 1024 ), 2), 'M') | |
| FROM table_name; |
| #!/bin/bash | |
| # digg.sh | |
| # Usage: digg [domain|ip|url] | |
| # Examples: | |
| # digg https://google.com/ | |
| # digg 67.1.1.1 | |
| # digg www.example.com | |
| <?php | |
| /* | |
| */ | |
| process(is_array($argv) ? $argv : array()); | |
| /** | |
| * processes the installer | |
| */ |
| @reboot /path/to/ha_monitor.sh >> /var/log/ha_monitor.log 2>&1 |