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
| /** | |
| * Created by Markus Tenghamn | |
| */ | |
| ini_set('display_errors', 1); | |
| error_reporting(E_ALL); | |
| $client_id = ""; | |
| $client_secret = ""; | |
| $scopes = array('read', 'write'); |
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
| $message = "Hello this is a test!"; // The message you would like to send | |
| $parameters = array( | |
| 'channel' => 'testing', // Simply type your channel name, make sure your bot is invited | |
| 'text' => html_entity_decode($message), // Good idea to decode | |
| 'as_user' => 'true'); | |
| // Use groups.list if you run into channel_not_found issues with private channels, make sure your bot is invited | |
| $url = "https://slack.com/api/"."chat.postMessage"; // chat.postMessage is the method | |
| $parameters['token'] = "MY-API-TOKEN"; // replace MY-API-TOKEN with the API Token for your bot |
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
| [ | |
| { | |
| "code": "011", | |
| "region": "Norrk\u00f6ping", | |
| "state": "\u00d6sterg\u00f6tlands l\u00e4n" | |
| }, | |
| { | |
| "code": "0120", | |
| "region": "\u00c5tvidaberg", | |
| "state": "\u00d6sterg\u00f6tlands l\u00e4n" |
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 | |
| /** | |
| * Created by PhpStorm. | |
| * User: Markus Tenghamn | |
| * Date: 18/12/15 | |
| * Time: 11:56 | |
| * | |
| * Place this in /usr/local/www/ and access it to get basic data about your pfsense installation. Use at your own risk. | |
| * | |
| */ |
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
| __author__ = 'MarkusTenghamn' | |
| # cocoa_keypress_monitor.py by Bjarte Johansen is licensed under a | |
| # License: http://ljos.mit-license.org/ | |
| # add the terminal application you run python from to application that are allowed to control your computer. This can be done in System Preferences > Privacy > Accessability. | |
| from AppKit import NSApplication, NSApp | |
| from Foundation import NSObject, NSLog | |
| from Cocoa import NSEvent, NSKeyDownMask | |
| from PyObjCTools import AppHelper |
NewerOlder