Skip to content

Instantly share code, notes, and snippets.

View zackshapiro's full-sized avatar

Zack Shapiro zackshapiro

View GitHub Profile
@zackshapiro
zackshapiro / fetchFollowerCounts.js
Created February 24, 2021 14:19 — forked from mtliendo/fetchFollowerCounts.js
retreive a list of followers from twitter
const cheerio = require('cheerio')
const axios = require('axios').default
async function fetchFollowerCounts(usernames) {
const followerData = usernames.map((username) => {
return axios.get(`https://mobile.twitter.com/${username}`).then((res) => {
const $ = cheerio.load(res.data)
const searchContext = `a[href='/${username}/followers']`
const followerCountString = $(searchContext)
.text()
@zackshapiro
zackshapiro / get-fonts.swift
Last active April 23, 2016 14:46 — forked from jbergen/get-fonts
Print font family and font names
for family in UIFont.familyNames() {
print("family: \(family)")
for name in UIFont.fontNamesForFamilyName(family) {
print("name: \(name)")
}
print("")
}