Skip to content

Instantly share code, notes, and snippets.

const {
openBrowser,
goto,
scrollDown,
click,
write,
dropDown,
alert,
closeBrowser,
$,
@stephenkeep
stephenkeep / print_scripts_and_styles.php
Created December 31, 2020 13:01
Pagedart.com - Dump all script and style handles at the bottom of any page by adding ?pagedart onto the end of the URL while logged-in as an Administrator level user.
global $pd_scripts;
$pd_scripts = array();
function list_scripts($tag, $handle) {
global $pd_scripts;
$pd_scripts[] = $handle;
return $tag;
}
add_filter('script_loader_tag', 'list_scripts', 10, 2);
var shhh = "SECRETPASSWORD";
function hexToRgb(hex) {
// No RegEx in Espruino yet...
var R, G, B;
if (hex.length == 3) {
R = hex.substring(0, 1);
R = R + R;
G = hex.substring(1, 2);
G = G + G;
[{"id":"96982482.6967d8","type":"subflow","name":"Obtain Action","info":"","in":[{"x":210,"y":69,"wires":[{"id":"6a2b6833.95d498"}]}],"out":[{"x":751,"y":66,"wires":[{"id":"449fa60a.f05c58","port":0},{"id":"6a2b6833.95d498","port":1}]}]},{"id":"449fa60a.f05c58","type":"function","z":"96982482.6967d8","name":"Obtain Action","func":"const table_data = global.get('configMap') || [];\n\nvar found_entities=[];\n\nvar reduced = table_data.filter(function(elem){\n var msg_entities = {};\n var msg_newEntities = false;\n if ( elem.entities !== false ) {\n //Check if the payload contains this entity\n var entities = Object.keys(msg.payload.outcomes[0].entities);\n var stateEntities = Object.keys(msg.chatstate.entities);\n //For each entity request by the config data\n for ( var i=0;i<elem.entities.length;i++ ) {\n //In the case the entity is missing\n if ( entities.indexOf(elem.entities[i]) !== -1 ) {\n //The row is not valid\n
[{"id":"55fffa69.aa0004","type":"twilio-connection","z":"3fd12692.c02eda","name":"Red Ant","api_sid":"AC08acacf831614258d5421508c6c2879e","api_token":"502082abaceb7ecc95937ddb054454b2"},{"id":"5cea0c73.a315f4","type":"twilio-connection","z":"3fd12692.c02eda","name":"Red Ant","api_sid":"AC08acacf831614258d5421508c6c2879e","api_token":"502082abaceb7ecc95937ddb054454b2"},{"id":"1bed078c.e412f8","type":"twilio-call","z":"3fd12692.c02eda","creds":"5cea0c73.a315f4","name":"","to":"+447968094455","from":"+441183100401","twilio_url":"https://techsprint2.redconnectapp.io/say","x":384,"y":162,"wires":[["5982ca03.a67d34"]]},{"id":"e766df72.18992","type":"inject","z":"3fd12692.c02eda","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":146,"y":99,"wires":[["1bed078c.e412f8"]]},{"id":"5982ca03.a67d34","type":"debug","z":"3fd12692.c02eda","name":"","active":true,"console":"false","complete":"false","x":615,"y":113,"wires":[]},{"id":"ead72efc.1528d","type":"twilio-say","z":"3fd12
[{"id":"6a1a54c1.ffa45c","type":"telegram bot","z":"","botname":"DotCustomerBot","usernames":"[]","chatids":"[]"},{"id":"5b53e329.a4ac1c","type":"inject","z":"77980932.8867f8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":88.5,"y":82,"wires":[["cad40d2.f352bf"]]},{"id":"cad40d2.f352bf","type":"function","z":"77980932.8867f8","name":"","func":"msg.payload = {};\n\nmsg.payload.type = 'location';\nmsg.payload.chatId = 9737717;\nmsg.payload.content1 = 'test';\nmsg.payload.content = {\n longitude: 0.977343122721668,\n latitude: 51.1227486937561\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":209.5,"y":143,"wires":[["45b23059.ba4dd"]]},{"id":"d9763646.2689c8","type":"debug","z":"77980932.8867f8","name":"","active":true,"console":"false","complete":"false","x":531.5,"y":143,"wires":[]},{"id":"45b23059.ba4dd","type":"telegram sender","z":"77980932.8867f8","name":"","bot":"6a1a54c1.ffa45c","x":360.5,"y":201,"wires":[["d9763646.2689c8"]]}]
[{"id":"5ff81b0e.a007e4","type":"onthedot-connection","z":"82e250b1.7d1db","name":"Red Ant","api_url":"https://sbapi.onthedot.com/api/v1.0","api_key":"1dOHtajAxKpCP0kLnc6BKMI6ZeQa"},{"id":"4c683b3f.b397c4","type":"onthedot-booking","z":"82e250b1.7d1db","creds":"5ff81b0e.a007e4","name":"Amend Booking","uuid":"","booking":{},"x":430,"y":113,"wires":[["936b83bf.6c948"]]},{"id":"5f17cc1a.a0e834","type":"inject","z":"82e250b1.7d1db","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":93.5,"y":117,"wires":[["dc521785.23ade8"]]},{"id":"3ae77815.c51888","type":"function","z":"82e250b1.7d1db","name":"","func":"msg.payload = {\n uuid: msg.payload.uuid,\n booking: {\n timeslot: {\n timeslotId: msg.payload.timeslotId\n },\n webhook: \"\",\n orderType: \"1\",\n supplierId: \"CitySprint\",\n accountNumber: \"W99969\",\n serviceType: \"Y2\",\n referenceNo: \"12\",\n orderNo: msg.payload.order_id,\n departmentReferenceN
[{"id":"eb5f1784.14a0e8","type":"onthedot-connection","z":"4dc47816.b23b88","name":"Red Ant","api_url":"https://sbapi.onthedot.com/api/v1.0","api_key":"1dOHtajAxKpCP0kLnc6BKMI6ZeQa"},{"id":"be5d113a.41a2f","type":"onthedot-timeslot","z":"4dc47816.b23b88","creds":"eb5f1784.14a0e8","name":"","store_id":"","postcode":"","delivery_date":"","x":385.5,"y":86,"wires":[["e81175e4.17ee88"]]},{"id":"4ec12066.b13ee","type":"inject","z":"4dc47816.b23b88","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":101.5,"y":75,"wires":[["28bc6c01.d74394"]]},{"id":"d14db38e.2eb25","type":"debug","z":"4dc47816.b23b88","name":"","active":true,"console":"false","complete":"false","x":675,"y":89,"wires":[]},{"id":"28bc6c01.d74394","type":"function","z":"4dc47816.b23b88","name":"","func":"msg.payload = {\n store_id: 'RedAnt-01',\n postcode: 'SW1P 4ES',\n delivery_date: '2016-03-19'\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":256.5,"y":81,"wires":[["be5d113a.41a2f"]]},{"id":"e81175
[{"id":"eb5f1784.14a0e8","type":"onthedot-connection","z":"4dc47816.b23b88","name":"Red Ant","api_url":"https://sbapi.onthedot.com/api/v1.0","api_key":"1dOHtajAxKpCP0kLnc6BKMI6ZeQa"},{"id":"4a99916a.b5667","type":"onthedot-delete-booking","z":"4dc47816.b23b88","creds":"eb5f1784.14a0e8","name":"","store_id":"","order_id":"","x":382.5,"y":456,"wires":[["c7e807ad.3817f8"]]},{"id":"d3c8273f.2c37d8","type":"inject","z":"4dc47816.b23b88","name":"","topic":"","payload":"{\"order_id\":\"17450353\",\"store_id\":\"RedAnt-01\"}","payloadType":"json","repeat":"","crontab":"","once":false,"x":92,"y":378,"wires":[["3fe83871.c017c8"]]},{"id":"c7e807ad.3817f8","type":"debug","z":"4dc47816.b23b88","name":"","active":true,"console":"false","complete":"false","x":563,"y":401,"wires":[]},{"id":"3fe83871.c017c8","type":"function","z":"4dc47816.b23b88","name":"","func":"msg.payload = {\n store_id: \"RedAnt-01\", \n order_id: \"17450353\"\n};\nreturn msg;","outputs":1,"noerr":0,"x":232.5,"y":381,"wires":[["4a99916a.b5667"]]}]