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
# when creating new Teams webhooks via workflows, old incoming webhook format is not working | |
# as Microsoft Power Automate workflow looks for "attachments" key in JSON body | |
# here is an example how to make it work: | |
curl -X POST $TEAMS_WEBHOOK_URL \ | |
-H 'Content-Type: application/json' \ | |
-d '{"attachments": [{"contentType": "application/vnd.microsoft.card.adaptive","content": | |
{ | |
"type": "AdaptiveCard", | |
"msteams": { |
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 | |
namespace App\Http\Middleware; | |
use Closure; | |
use Monolog\Logger; | |
use Monolog\Handler\StreamHandler; | |
use Log; | |
class Security { |
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 | |
/* | |
Returns array with object properties, static properties and constants | |
Can be used for: | |
* Object to array conversion | |
* Get all properties (protected and private) list outside the class | |
* Get protected property value outside the class | |
* Get private property value outside the class |
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
<!-- | |
This code will translate page contents automatically (without user input) | |
Settings located at line 9, current script will translate english to estonian | |
--> | |
<style>#google_translate_element,.skiptranslate{display:none;}body{top:0!important;}</style> | |
<div id="google_translate_element"></div> | |
<script> | |
function googleTranslateElementInit() { | |
new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'et', autoDisplay: false}, 'google_translate_element'); | |
var a = document.querySelector("#google_translate_element select"); |
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
// Convert PhantomJs cookies to NetScape HTTP cookie file format | |
// NOTE: It dose not create NetScape HTTP cookie file, this function return only cookie file contents | |
// NOTE: PhantomJs do not store "host only" cookie param, all cookies will have "host only" param set to false (line 15) | |
// I use this function to export PhantomJs cookies to CURL cookiejar file | |
// This is modified version of EditThisCookie cookie_helpers.js cookiesToString function | |
// USAGE: phantomJsCookiesToNetScapeString(phantom.cookies); | |
var phantomJsCookiesToNetScapeString = function(cookies) { | |
var string = ""; | |
string += "# Netscape HTTP Cookie File\n"; |