Google Form to Google Sheets to Vue Website

When @cogdog & @twoodwar Were Building Websites From Google Spreadsheets Years Ago https://t.co/Im7oCecvpg — Keegan?Long-Wheeler (@KeeganSLW) February 28, 2018 This post from Keegan kicked of this demo.1 The goal is to create a pretty flexible template for using Google Forms to Google Sheets to simple website. I opted to do this one in Vue but may get around to doing it in plain JS or jquery if time allows. The first thing you need to do is make the form and put in some entries. You’ll be happier if your form prompts aren’t super long. Make them readable just keep them concise.2 Once you’ve made a few entries so you have some data to work with, publish your spreadsheet as HTML. File>Publish to the Web. Click OK and what not. Don’t bother going to that link as Google has made that a fake promise. You just need the ID of the document in your current view. It’ll be something painful like 12WsyLvtfIPJkCXgEXsRkrI6dS0_K6brJikZqzkQa8TU and is visible in the URL after the /d/ but before the /edit. You can see the spreadsheet here. It doesn’t really matter but !full transparency! With that ID in hand, you want to go to a URL like so. You could manipulate the number in the URL to hit different pages in the spreadsheet. https://spreadsheets.google.com/feeds/list/12WsyLvtfIPJkCXgEXsRkrI6dS0_K6brJikZqzkQa8TU/1/public/values?alt=json You should […]


Add Custom Field to WordPress API & Filter

I found myself in a strange situation where I needed to know if a page had a child. Natively the WP API lets you know if a page has a parent but not the reverse. First I had to write a function that writes some data to a custom field if a page has a child. Then I started writing this post and realized I needed to do the reverse and now I’ve written a function that writes data to a parent when the child is created. Now that I had the data being written to the custom field, I needed to make that data visible in the WP REST API. Luckily, Jeff put up a snippet for that not too long ago. Now I also wanted to be able to return data based on the contents of the has_children field. This filter1 does that. Now a URL like the one below will give me pages with children but without parents. /wp-json/wp/v2/pages?_embed&per_page=30&has_children=1&parent=0 This will help me make a fairly large menu structure more manageable and I figured having something like this all in one place might help someone else. 1 I usually call things ‘chunks’ of code but I’m trying to improve my vocab.


Unhide Custom Fields Screen Options When Using Advanced Custom Fields

If you use Advanced Custom Fields you may not realize it removes the ‘Custom Fields’ option from your Screen Options view and hides them entirely in the space they normally occupy below your posts/pages. That’s nice occasionally and a pain other times. Today it was a pain. I figured this out one time before but it took me a while to re-find it at this github page so I’m leaving it here in case I forget again.


Weekly Web Harvest for 2018-02-18

apache/incubator-superset: Apache Superset (incubating) is a modern, enterprise-ready business intelligence web application h/t Downes Plotting the Course Through Charted Waters Heat maps, stacked area plots, mosaic plots, choropleths – oh my! There are so many different ways to visually convey relationships and patterns in data! In this workshop on data visualization literacy, you’ll learn to recognize many popular types of charts and how to glean insights from them. The Appendix contains some examples of data visualization as visual essays and it also includes links to resources for learning how to create your own. About Frankenbook Frankenbook is a collective reading and collaborative annotation experience of the original 1818 text of Frankenstein; or, The Modern Prometheus, by Mary Wollstonecraft Shelley. The project launched in January 2018, as part of Arizona State University’s celebration of the novel’s 200th anniversary. Even two centuries later, Shelley’s modern myth continues to shape the way people imagine science, technology, and their moral consequences. Frankenbook gives readers the opportunity to trace the scientific, technological, political, and ethical dimensions of the novel, and to learn more about its historical context and enduring legacy. Do It Yourself – Futility Closet Society of Mutual Autopsy (Société d’autopsie mutuelle), founded in 1876 “for the purpose of furnishing to the investigations of medicists brains superior to those of the common people.”

A portrait of David that I took on a VCU shuttle bus.

Photography – #163

I ended up talking to David on the bus from the Medical Campus to Monroe Park. We started off talking a bit about cameras. From there I found out David has six children. Four of those children are adopted. He believes strongly in trying to do good in the world and this is part of that effort. David’s a very devout Christian and referenced God repeatedly in our conversation. He did it in a way that seemed very natural. We talked a bit about how much children learn from their parents and their actions even when that isn’t the intent. David talked about how he teaches a course and on radiology transportation (his current occupation). He talks about starting the class focusing on making good choices and how, with that foundation, everything else can be learned in time. David’s brother died about a year ago in a car accident and was an organ donor. He was there when the hospital called his father to confirm the organ donation. His father couldn’t answer the question and gave the phone to David who agreed that all the organs should be donated except the eyes. “Because the eyes are the windows to the soul.” All in all, a pretty intense and wide-ranging conversation for a short bus ride.

Screenshot indicating this user has several hundred sites associated with their account.

So Many Sites – Cleaning Up Users

There are lots of ways users can end up associated with many sites in a WordPress multisite install. That’s no big deal if it’s only five or ten but sometimes it’s way more. It’s not just messy, it actually degrades performance when you’re logged in because the admin menu bar loads all those sites. This can really become a drag as you pass a hundred or so sites. Previously, I’ve just given up on the user and made a new one. I’ve also gone through https://theSite.us/wp-admin/network/users.php and opened up a number of sites and removed the user from each one manually. That’s a pretty awful pattern but being in a hurry leads to all sorts of bad choices.1 Today I got the request to remove around six hundred sites from a particular faculty member. The request coincided with time and mental bandwidth so I opted to do this in an intelligent way. There was also no way I was going to do this by hand. First step would be to get the user’s id from the wp_users table. You can look up users here by user_login or user_email and get to what you need pretty quickly. If you’re using Sequel Pro rather than the terminal don’t forget to restrain your searches by the right field. For this example, we’ll pretend […]


WordPress Timeline JS Plugin

Background I like Timeline JS. It’s a nice way to create multimedia timelines. I’d previously done some work that would take WordPress JSON API data and insert it into the Timeline JS view.1 It was nice for creating alternate and standardized views of blogs that might be useful for different reasons. It didn’t serve some other needs and while doing it through a generic URL was handy for many reasons it was odd in other scenarios. As a result I decided to make a new version as a plugin. If you don’t like reading stuff there’s a quick video of how it works below. Plugin Goals First, I wanted this to be a plugin rather than a theme. That adds a bit of complexity because you don’t have control of the whole scenario but it makes it much more portable and more likely to be used as it doesn’t require people to change themes or spin up an additional site. I wanted people to be able to use WordPress rather than a spreadsheet to create the content for Timeline JS. Doing that has a few advantages- the WYSIWYG editor, the ability to upload images directly in WordPress, the ability to use posts you’ve already written, etc. etc. I also wanted people to be able to choose what posts ended up […]


Weekly Web Harvest for 2018-02-11

Porsche Classic supplies classic parts from a 3D printer Due to the consistently positive results received to date, Porsche is currently manufacturing eight other parts using 3D printing. The parts in question are steel and alloy parts produced using the selective laser melting process, and plastic components manufactured using an SLS printer HUBzero – Home Host analytical tools, publish data, share resources, collaborate and build communities in a single web-based ecosystem.

cartoon face eating cheetos.

Screen Time

Every time I hear something about limiting screen time I cannot help but think about how poorly the concept has been thought out. If we talked about “food time” instead maybe that would help us think that while time matters (eating for hours each day is probably a bad idea), how long you eat probably matters far less than what you’re eating. You have to think about both things. Funneling cheetos for 30 minutes a day is worse than eating carrots for an hour.1 Screen time isn’t a single thing. It’s an insane range of things. There’s lots of screen time that is of Twinkie quality but there are many other options. If I read a book on a device is it screen time or is that reading? If I’m coding for an hour? Editing video? Video chat with my parents? When we reduce things to this extent we end up doing things that ignore the actual problem. So the next time someone on the radio or TV talks about screen time as if it were a single thing please join me in envisioning the giant cartoon heads depicted below. 1 Funneling cheetos may not even qualify as actually eating. It’s a chemical endurance sport that will likely be featured in the next Olympic games


Weekly Web Harvest for 2018-02-04

Bildung – Wikipedia The term Bildung also corresponds to the Humboldtian model of higher education from the work of Prussian philosopher and educational administrator Wilhelm von Humboldt (1767–1835). Thus, in this context, the concept of education becomes a lifelong process of human development, rather than mere training in gaining certain external knowledge or skills. Such training in skills is known by the German words Erziehung, and Ausbildung. Bildung in contrast is seen as a process wherein an individual’s spiritual and cultural sensibilities as well as life, personal and social skills are in process of continual expansion and growth. Apple HomePod review: locked in – The Verge When you set down a HomePod and play music, it goes through a number of steps to tune itself. First, it tries to create a model of the room it’s in by detecting the sounds reflecting off walls. It does this in two passes: the first pass builds a model to a high degree of initial confidence, and the second pass refines the model. This happens faster if you’re playing music with a lot of bass. Episode No. 113: What’s Going On in This Graph? – Policy Viz Michael Gonchar and Sharon Hessney lead a new project at the New York Times called “What’s Going On in This Graph?” (WGOITG). Every second Tuesday of […]