This file contains 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
(function () { | |
var ts = document.getElementsByTagName("table"); | |
for (var t = 0; t < ts.length; t++) { | |
var at = ts[t]; | |
at.style.width = '100%'; | |
if (at.className == "listtable") { | |
for (var r = 0; r < at.rows.length; r++) { | |
var ar = at.rows[r]; | |
for (var c = 1; c < ar.cells.length;c++) { | |
var ac = ar.cells[c]; |
This file contains 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
/* | |
Export HN Favorites to CSV. | |
Setup: | |
Copy this code to the browser console or, if using Chrome, to a Snippet. For example: | |
1. Press F12 (Windows) to open DevTools. | |
2. Go to Sources > Snippets, click New Snippet. | |
3. Give it a name, eg, "Export HN Favorites". | |
4. Copy/paste the code from ... | |
5. Save (Ctrl+S, Windows). |
This file contains 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 bash | |
# Set these: | |
url='https://COMPANY.okta.com/api/v1/users' | |
token='...' | |
# Pagination code based on https://michaelheap.com/follow-github-link-header-bash | |
while [ "$url" ]; do | |
r=$(curl -i --compressed -Ss -H "authorization: SSWS $token" "$url" | tr -d '\r') | |
headers=$(echo "$r" | sed '/^$/q') |