Checking and Correcting Permissions in Amazon Redshift

I needed to make sure I had two users in an Amazon Redshift cluster (readonly and readwrite). I needed to make sure their permissions were set appropriately so the first step was to first see what their permissions were on the schema and then the tables. First we check their schema permissions with the below query that makes use of the has_schema_privilege function: SELECT u.usename, s.schemaname, has_schema_privilege(u.usename,s.schemaname,'create') AS user_has_create_permission, has_schema_privilege(u.usename,s.schemaname,'usage') AS user_has_usage_permission FROM pg_user u CROSS JOIN (SELECT DISTINCT schemaname FROM pg_tables) s WHERE (u.usename = 'readonly' OR u.usename = 'readwrite') AND s.schemaname = 'public'; The query above filters on the specific users and schema I’m checking against. You are welcome to customize this query to look for all users and/or all schemas. This query results in the below permissions on the public schema for these users: ...

August 16, 2022 · 4 min · Scott

Speeding Up WordPress

I started messing around with my WordPress by first adding in a layer of security in Adding Nginx in Front of WordPress. After putting Nginx in front of my WordPress, I decided that I would further secure it by also Building a Static WordPress. That’s great and all but maybe it was time to make Nginx give me some performance gains rather than just some security controls. That is exactly what we’re going to do in this blog post. Now that Nginx is sitting in front of WordPress, we can use it to control some of the performance aspects. ...

February 25, 2021 · 3 min · Scott

LED Lighting

It’s time to get back to some lighting as I spent a little time enhancing my setup that I left off configuring in Making the Lights Dance. In my Building the RaspberryPi Christmas Light Box post, I blamed a friend for starting me down this path. Once again, I’m blaming a different friend for causing me to wander down the LED lighting road. This friend saw some of my posts regarding the simplistic lighting box I created, and they suggested that I tinker with WS2811 lights. Let the tinkering begin! ...

February 18, 2021 · 6 min · Scott

Automating Static WordPress Updates

From that previous post, you’ll note that I had a bunch of unanswered questions. Some of those questions might remain unanswered. By the time you get to the end of this post, you might be able to address them yourself. I’m going to focus on automating static WordPress updates whenever a new post is published. This similar logic should be possible to replicate when it comes to needing to update static content based upon WordPress and WordPress plugin updates. ...

February 11, 2021 · 7 min · Scott

Samsung Phone Dropping WiFi

I was getting so frustrated with my new phone. I got on the preorder list and was all excited to get my brand new Samsung Note20 Ultra. After it was delivered, I did the standard switch to the new phone. Thank you AT&T and Samsung for making the upgrade from my Note8 to the Note20 so easy! 5G is Great, WiFi is Useless The new 5G was great and working just fine but my problem is that I was using the mobile network way more than my WiFi connection. Anytime I would pick up my phone, the WiFi would be dead. I would either need to wait several minutes for the connection to return or turn off/on my WiFi. This great new awesome phone was useless in the house! More importantly, I have a few Google Home devices so I was unable to cast to them. ...

February 4, 2021 · 4 min · Scott