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
| crmAPIRequestMap = crmAPIRequest.toMap(); | |
| body = crmAPIRequestMap.get("body"); | |
| try | |
| { | |
| body_parts = body.toList("&"); | |
| message_body = ""; | |
| from_number = ""; | |
| message_sid = ""; | |
| to_number = ""; | |
| for each body_part in body_parts |
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
| // ==UserScript== | |
| // @name Hide emails | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description try to take over the world! | |
| // @author You | |
| // @match https://mail.google.com/mail/u/0/ | |
| // @match *://abc.net.au | |
| // @match *://facebook.com | |
| // @match *://www.facebook.com |
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
| const request = require("request-promise"); | |
| const clientID = | |
| "REDACTED"; | |
| const clientSecret = | |
| "REDACTED"; | |
| async function createSTC() { | |
| const timestamp = new Date().toISOString(); | |
| const signatureString = `GD:${clientID}${timestamp}${clientSecret}`; | |
| const crypto = require("crypto"); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <style> | |
| [data-download] { | |
| color: blue; | |
| } | |
| [data-download][href="#"] { |
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
| import React, { Component } from 'react'; | |
| import { Consumer as I18nConsumer } from '@App/I18nContext'; | |
| import { i18n } from 'i18next'; | |
| import { connect } from 'react-redux'; | |
| import AttemptSubmitActionCreator from '@App/RequestData/redux/action-creators/attemptSubmit'; | |
| import { IStoreState } from '@Redux/storeGenerator'; |
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
| it('should trigger mutation when submit button clicked', async () => { | |
| // NB submit button relies on the redux store having valid data | |
| // which is why I set it here | |
| set('reduxState', { | |
| selectedMeters: [123], | |
| selectedMeasurements: ['elec_power_real'], | |
| exportParameters: { | |
| dateRange: { | |
| start: new Date(Date.UTC(2017, 0, 1)), | |
| finish: new Date(Date.UTC(2018, 0, 1)) |
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
| class SubmitFormFixture extends Component { | |
| public displayName = 'SubmitForm'; | |
| public render() { | |
| return ( | |
| <Query query={getAvailableOptions}>{({ loading, error, data }) => ( | |
| <Fragment> | |
| <span data-result={JSON.stringify({ | |
| loading, | |
| error, |
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
| class SubmitFormFixture extends Component { | |
| public displayName = 'SubmitForm'; | |
| public render() { | |
| return ( | |
| <Query query={getAvailableOptions}>{() => <SubmitFormComponent />}</Query> | |
| ); | |
| } | |
| } |
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
| const updateCache = (cache: any) => { | |
| const { availableOptions } = cache.readQuery({ query: getAvailableOptions }); | |
| cache.writeQuery({ | |
| query: getAvailableOptions, | |
| data: { | |
| availableOptions: { | |
| ...availableOptions, | |
| submitted: true | |
| } |
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
| export default { | |
| reduxState: { | |
| exportParameters: { | |
| dateRange: { | |
| start: new Date('2018-04-02'), | |
| finish: new Date('2019-04-02') | |
| } | |
| } | |
| }, |