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
| console.log('Loading function'); | |
| const https = require('https'); | |
| const url = require('url'); | |
| // to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration | |
| const slack_url = 'https://hooks.slack.com/services/...'; | |
| const slack_req_opts = url.parse(slack_url); | |
| slack_req_opts.method = 'POST'; | |
| slack_req_opts.headers = {'Content-Type': 'application/json'}; |
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
| # Tweaked from http://tomislavsantek.iz.hr/2011/03/moving-mysql-databases-to-ramdisk-in-ubuntu-linux | |
| # Log in as root | |
| # Mount ramdisk folder in RAM | |
| mkdir /tmp/ramdisk | |
| mount -t tmpfs -o size=128M tmpfs /tmp/ramdisk/ | |
| # Move MySQL data | |
| mv /var/lib/mysql /tmp/ramdisk/mysql | |
| ln -s /tmp/ramdisk/mysql/ /var/lib/mysql |