This file contains 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 |
This file contains 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 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 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 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 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
foreach ($tournament->groups as $group) { | |
$i = 0; | |
foreach ($group->games->all() as $game) { | |
$x = 0; | |
foreach ($game->teams as $team) { | |
foreach ($teams as $t) { | |
if ($t == $team->name) { | |
break; | |
} | |
} |
This file contains 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
package main | |
// Scratch File for https://github.com/markustenghamn/bittrex-trading-bot | |
import "log" | |
func main() { | |
var1 := 0.000273 | |
var2 := 0.0002733 | |
var3 := 0.0002734 |
This file contains 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 Markus Tenghamn @ GoPHP.io | |
* Date: 2018-12-29 | |
* Time: 12:47 | |
* | |
* Post a simple slack message using a bot. You can run this in a console with 'php slack.php' | |
* | |
* See my blog post at https://gophp.io/developing-slack-bots-with-php-part-1 for a guide on how this works | |
*/ |
This file contains 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
package main | |
// Created by Markus Tenghamn @ GoPHP.io | |
// | |
// Post a simple Slack message using a bot | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" |
This file contains 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
2 x 7g yeast | |
125ml warm milk | |
250g plain flour | |
35g powdered sugar | |
35g soft butter | |
pinch salt | |
100g soft butter | |
100g powdered sugar | |
2 teaspoons cinnamon |
OlderNewer