Skip to content

Instantly share code, notes, and snippets.

View NoWorries's full-sized avatar

Josh Harwood NoWorries

View GitHub Profile
@NoWorries
NoWorries / SketchSystems.spec
Last active August 15, 2018 03:14
Brand Tokens
Brand Tokens
Vanilla Tokens
Apply -> Vanilla
Spark Tokens
Apply -> Spark
Skinny Tokens
Apply -> Skinny
Spark Digital Tokens
Apply -> Spark Digital

Keybase proof

I hereby claim:

  • I am noworries on github.
  • I am noworries (https://keybase.io/noworries) on keybase.
  • I have a public key ASDm1520O7EmCKqcAp_PC38qgcXvpz78h6GR_vV_cSFINwo

To claim this, I am signing this object:

@NoWorries
NoWorries / imgix-lightbox-examples.markdown
Created January 17, 2019 01:24
ImgIx - Lightbox examples

Keybase proof

I hereby claim:

  • I am noworries on github.
  • I am noworries (https://keybase.io/noworries) on keybase.
  • I have a public key ASCcu7lA2EZ2lA6gC3XwunxcA08aFyVidDJ9RON0QtFFCAo

To claim this, I am signing this object:

graph TD
O{How many items?}-->|One|A
O-->|Multiple|P{Device}
A{Device} -->|Desktop|D
A-->|Mobile|H
D{How many buttons?} -->E(One)
D-->F(Two)
D-->G(Three)
const doc = figma.currentPage.parent as DocumentNode;
const CountIndividual = [];
const CountSet = [];
const CountVariant = [];
const PublishedNames = [];
const HiddenNames = [];
for (let p = 0; p < doc.children.length; p++) {
const page = doc.children[p];
@NoWorries
NoWorries / ExportFigmaAnalytics.js
Last active March 31, 2024 09:49
Export Figma Analytics - Bookmarklet
javascript:(function()%7Bif%20(document.querySelector('%5Bclass*%3D%22component_file_view_header--header--%22%5D'))%20%7B%0A%20%20%20%20%20%20%2F%2F%20Call%20the%20function%20for%20element1%0A%20%20%20%20%20%2F%2F%20functionForElement1()%3B%0A%20%20%20%20%20%2F%2F%20alert(%22component%20page%22)%3B%0A%0A%20%20%20%20%20%20%2F%2F%20Export%20Figma%20Component%20Analytics%0A%0A%20%20%20%20%20%20%2F%2F%20Scrape%20content%20from%20the%20webpage%0A%20%20%20%20%20%20const%20containerDiv%20%3D%20document.querySelector('div%5Bclass*%3D%22library_item_view--fileViewDSANoTab--%22%5D%20div%5Bclass*%3D%22library_item_stats--allComponentsTable--%22%5D')%3B%0A%20%20%20%20%20%20const%20rows%20%3D%20Array.from(containerDiv.querySelectorAll('div%5Bclass*%3D%22library_item_view--fileViewDSANoTab--%22%5D%20div%5Bclass*%3D%22library_item_stats--row--%22%5D'))%3B%0A%0A%20%20%20%20%20%20%2F%2F%20Extract%20table%20headings%0A%20%20%20%20%20%20const%20headerRow%20%3D%20containerDiv.querySelector('div%5Bclass*%3D%22library_item_stats--
@NoWorries
NoWorries / Scrape component gallery page to CSV
Last active June 15, 2023 23:46
Extract a CSV from component.gallery page with all the links to the design system and page metadata
import requests
from bs4 import BeautifulSoup
import csv
from urllib.parse import urlparse, urljoin
# read the CSV file and extract all URLs
urls = []
with open("sitemap_links.csv", "r") as csvfile:
reader = csv.reader(csvfile)
for row in reader:
@NoWorries
NoWorries / export_links.py
Last active September 17, 2023 10:24
Python script to export a CSV of the links from all the pages on website. Ignoring common header and footer elements and focusing on the main part of the page to reduce duplication.