How to Extract all Images from a Webpage with Ruby
Here is a little ruby snippet that will download all pictures from a webpage.
Rather than using XPath, we are going to first reduce the source code to capture everything inside of quotes. Some websites use JSON w/in a script tag to lazy load images an...
Written by Sean Behan on 08/01/2018
How to Read Response Body HTML with Javascript Fetch Method with React Native
In React Native you see a lot of tutorials and articles using the `fetch` method when interacting with `JSON` APIs. It's great for this and the the pattern looks like this
fetch(url).then((resp)=>{ return resp.json() }).then((json)=>{ console.log(json...
Written by Sean Behan on 07/17/2017
Pretty Formatted JSON from the Command Line
Sometimes you want to see JSON from the command line. I'm sure there are better tools for the job, but here is a little snippet you can throw in your ~/.bash_profile.
function json { curl -s "$1" | python -mjson.tool; }
Usage
json https://g...
Written by Sean Behan on 08/21/2013