d3js: Create a table using data from a CSV file.
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> | |
| <title>Say it to me!</title> | |
| <link rel="stylesheet" href="http://cheeaun.github.com/cacss/ca.min.css"> | |
| <style> | |
| body{ | |
| text-align: center; | |
| } | |
| input, button{ | |
| font-size: 2em; | |
| width: 70%; |
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 function runs when the spreadsheet is opened and populates a menu option | |
| labelled Zendesk that contains two options (7 days and 30 days) which are tied | |
| to the listed functions | |
| */ | |
| function onOpen() { | |
| var sheet = SpreadsheetApp.getActiveSpreadsheet(); | |
| var entries = [{ | |
| name : "Pull Satisfaction Data (last 7 days, rolling)", | |
| functionName : "getSatisfactionDataLast7" |
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
| // Get Youtube URL | |
| $yturl = 'https://www.youtube.com/watch?v=HhAKNSsb4t4'; | |
| preg_match("/^(?:http(?:s)?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?v(?:i)?=|(?:embed|v|vi|user)\/))([^\?&\"'>]+)/", $yturl, $matches); | |
| $video_id = $matches[1]; | |
| // Get Thumbnail | |
| $file_headers = get_headers( 'http://img.youtube.com/vi/' . $video_id . '/maxresdefault.jpg' ); | |
| $is_404 = $file_headers[0] == 'HTTP/1.0 404 Not Found' || false !== strpos( $file_headers[0], '404 Not Found' ); | |
| $video_thumbnail_url = $is_404 ? 'http://img.youtube.com/vi/' . $youtube_id . '/maxresdefault.jpg' : 'http://img.youtube.com/vi/' . $video_id . '/hqdefault.jpg'; |
I this is part of the first node web scraper I created with axios and cheerio. I took out all of the logic, since I only wanted to showcase how a basic setup for a nodejs web scraper would look.
const cheerio = require('cheerio'),
axios = require('axios'),
url = `<url goes here>`;
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
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |
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
| /* | |
| Script to iterate through Files/Folders in Google Drive and change Ownership. | |
| Will only attempt change after getting the current Owner and checking for match | |
| from 'Welcome' sheet. | |
| See blog post for full details and original spreadsheet: https://www.pbainbridge.co.uk/2020/04/bulk-change-ownership-of-google-drive.html | |
| Note: | |
| > Current Owner will become an Editor - include option to remove them? | |
| > New Owner will get an email for each item. |