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
// Generate Access Token | |
// https://bitly.com/a/oauth_apps | |
var shortenUrl = function(accessToken, longUrl) { | |
$.getJSON('https://api-ssl.bitly.com/v3/shorten', { | |
access_token: accessToken, | |
longUrl: longUrl | |
}) | |
.success(function(resp) { | |
console.log('URL: ', resp.data.url); |
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 axios from 'axios' | |
const MAX_REQUESTS_COUNT = 5 | |
const INTERVAL_MS = 10 | |
let PENDING_REQUESTS = 0 | |
// create new axios instance | |
const api = axios.create({}) | |
/** |
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
#!/usr/bin/env python | |
# -*- coding: utf-8-*- | |
""" | |
Webscrape Intercom Help Articles and export them into markdown and html as a JSON data file | |
This captures Collection info but not Sections. Images are downloaded into an images folder. | |
The images are renamed with the collection directory name (see the dir_map dict below) in numerical order. | |
You will need to dedupe duplicate images using another tool. Renaming the images avoids bad initial names | |
and duplicate image filenames (quick hack and not ideal - feel free to improve as desired.) |
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
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
OlderNewer