- Create repo on GitHub where you'll put your files.
- Use jsDeliver or statically to get your assets.
Here is repo I'm using:
https://github.com/jcubic/static
And links to files look like this:
Here is repo I'm using:
https://github.com/jcubic/static
And links to files look like this:
| function copyFbRecord(oldRef, newRef) { | |
| return Promise((resolve, reject) => { | |
| oldRef.once('value').then(snap => { | |
| return newRef.set(snap.val()); | |
| }).then(() => { | |
| console.log('Done!'); | |
| resolve(); | |
| }).catch(err => { | |
| console.log(err.message); | |
| reject(); |
| import webdriver from 'selenium-webdriver' | |
| import test from 'selenium-webdriver/testing' | |
| test.describe('Test', () => { | |
| test.it('with headless chrome.', () => { | |
| const chromeCapabilities = webdriver.Capabilities.chrome(); | |
| chromeCapabilities.set('chromeOptions', { | |
| 'args': ['--headless', '--disable-gpu'] | |
| }); | |
| driver = new webdriver.Builder() |
| /** | |
| * 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(); |
Visit the new improved script here! Smooth scroll to top of page (Improved!)
If you need a plain JavaScript function to add a smooth scrolling back to the top of the page, you can use this script.
<body> tag. Like this: <body id="top">onclick function to the link. Like this: <a href="#top" onclick="scrollToTop(); return false">Back to Top ↑</a>| // Fix Vendor Prefixes | |
| var IS_CHROME = !!window.webkitRTCPeerConnection, | |
| RTCPeerConnection, | |
| RTCIceCandidate, | |
| RTCSessionDescription; | |
| if (IS_CHROME) { | |
| RTCPeerConnection = webkitRTCPeerConnection; | |
| RTCIceCandidate = window.RTCIceCandidate; | |
| RTCSessionDescription = window.RTCSessionDescription; |
| //return an array of objects according to key, value, or key and value matching | |
| function getObjects(obj, key, val) { | |
| var objects = []; | |
| for (var i in obj) { | |
| if (!obj.hasOwnProperty(i)) continue; | |
| if (typeof obj[i] == 'object') { | |
| objects = objects.concat(getObjects(obj[i], key, val)); | |
| } else | |
| //if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not) | |
| if (i == key && obj[i] == val || i == key && val == '') { // |
| public class GistsResolver { | |
| public static string CreateContentForFeedFrom(string content) { | |
| try { | |
| return UnwrapGists(content, GetGist); | |
| } | |
| catch { | |
| return content; | |
| } | |
| } |