By Ryan Aunur Rassyid
Simply create RESTful API with Google Script and store it to Google SpreadSheet like a Pro.
| <?php /** @noinspection SpellCheckingInspection */ | |
| /** | |
| * This file contains the WordPress code for rendering a Google Reviews badge. | |
| * | |
| * Usage: | |
| * | |
| * 1. Create a Google API Console account if you have not already done so. | |
| * 2. Register for the Google Places API. | |
| * 3. Create an API key. | |
| * 4. Ensure that the API key can be used from wherever this script will execute |
| <?php | |
| /** | |
| * Gravity Wiz // Gravity Forms // Rename Uploaded Files | |
| * | |
| * Rename uploaded files for Gravity Forms. You can create a static naming template or using merge tags to base names on user input. | |
| * | |
| * Features: | |
| * + supports single and multi-file upload fields | |
| * + flexible naming template with support for static and dynamic values via GF merge tags | |
| * |
| import React, { Component } from 'react' | |
| import { Redirect } from 'react-router' | |
| export default class ContactForm extends Component { | |
| constructor () { | |
| super(); | |
| this.state = { | |
| fireRedirect: false | |
| } | |
| } |
| function MXLookup(domain) { | |
| try { | |
| var url = "https://dns.google.com/resolve?name=%FQDN%&type=MX".replace("%FQDN%",domain); | |
| //var url = "https://dns.google.com/resolve?name=e-mercy.com&type=MX"; // USED FOR TESTING ONLY | |
| Utilities.sleep(100); | |
| var result = UrlFetchApp.fetch(url,{muteHttpExceptions:true}); | |
| var rc = result.getResponseCode(); |
| var fs = require('fs'); | |
| var Promise = require('promise'); | |
| var promises = []; | |
| var readline = require('readline'); | |
| var readFile = function (file) { | |
| return new Promise(function (resolve, reject) { | |
| var lines = []; | |
| var rl = readline.createInterface({ | |
| input: fs.createReadStream('./logs/' + file) |
| /* | |
| updated 2018-04-28 | |
| source lives here: https://gist.github.com/nicobrx/2ecd6fc9ca733dcd883afebba5cf200e | |
| standalone script ID for use as a library: 1gZ78JObyrYiH0njoZ86fQ2NgMwavUgiXVhRDrIFetPZL256e31PSNiHq | |
| Functions included here: | |
| Sheets data array and object functions | |
| objectifySheet(sheet,propertyNames,newPropertyNames) - Takes a sheet with a header row and converts it into an array of objects | |
| arrayFromSheet(sheet,propertyNames,newPropertyNames) - creates an array from a sheet, can specify column headers |
| /* Copyright 2012 Martin Hawksey (email : martin.hawksey@gmail.com) | |
| This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; either version 2 of the License, or | |
| (at your option) any later version. | |
| This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| /** | |
| * Using Operator Mono in Atom | |
| * | |
| * 1. Open up Atom Preferences. | |
| * 2. Click the “Open Config Folder” button. | |
| * 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up. | |
| * 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden! | |
| * 5. Tweak away. | |
| * | |
| * Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png): |
| chanceflurries | |
| chancerain | |
| chancesleet | |
| chancesleet | |
| chancesnow | |
| chancetstorms | |
| chancetstorms | |
| clear | |
| cloudy | |
| flurries |