$ cd ~/Library/Application\ Support/Postgres/var-10
$ rm -f postmaster.pid
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
| /* | |
| The intent of this script is for posting filtered Gmail messages to Slack. | |
| This script could be used on its own with manually-marked messages, but it | |
| is most useful it when combined with a Gmail filter. The script assumes that | |
| target messages have had a specific label set on them and have been starred. | |
| The Apps Script can then be set to run periodically. | |
| 2015/02 cmyers, rush | |
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
| function createAndSendDocument() { | |
| // Create a new Google Doc named 'Hello, world!' | |
| var doc = DocumentApp.create('Hello, world!'); | |
| // Access the body of the document, then add a paragraph. | |
| doc.getBody().appendParagraph('This document was created by Google Apps Script.'); | |
| // Get the URL of the document. | |
| var url = doc.getUrl(); |
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
| // You will also need to create a gmail filter to add the 'send-to-slack' label | |
| // to any emails you want sent to slack | |
| function sendEmailsToSlack() { | |
| var label = GmailApp.getUserLabelByName('send-to-slack'); | |
| var messages = []; | |
| var threads = label.getThreads(); | |
| for (var i = 0; i < threads.length; i++) { | |
| messages = messages.concat(threads[i].getMessages()) |
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 | |
| /** | |
| * Post a message to Slack from WordPress | |
| * | |
| * @param string $message the message to be sent to Slack | |
| * @param string $channel the #channel to send the message to (or @user for a DM) | |
| * @param string $username the username for this bot eg : WordPress bot | |
| * @param string $icon_emoji the icon emoji name for this bot eg :monkey: | |
| * |