My Google Searches

A running list of my searches and the results that helped me accomplish my tasks. |

Search

“What to do if you get a 500 error when trying to access your WordPress Dashboard”

by

What I was after

Recently, I was trying to access the WordPress Dashboard of a site I hadn’t worked on in a while. Unfortunately, while the main site was working, I got a 500 error when trying to reach the Dashboard or Admin area of the site. My goal was to regain access without losing anything in the process.

500 error received when trying to access WordPress Dashboard area

The result(s)

There were some interesting resources on the 500 error as it relates to WordPress, but none of them actually had a solution that worked for me (I tried manually upgrading my version of WordPress, removing the Plugins, and Deleting the .htaccess file to no avail).

The important bits

In my case, the site was using an older version of WordPress (4.3.16) but I was running a recent version of PHP on my host (7.1). Temporarily changing my PHP version down to 5.5 allowed me to regain access to the WordPress Dashboard of the site. I upgraded the site to the latest version of WordPress through the Dashboard, updated my plugins, and then switched by PHP version back to 7.1 and have been able to maintain Dashboard access.

Strange that manually upgrading the WordPress version to the most recent release through FTP didn’t fix it and that it had to be upgraded when the PHP version was set to the older version, but this is what fixed it and everything is accessible now, so I’m not complaining and I hope this weird experience helps someone else in the same boat.

“What’s the best thing to cook in with a sous vide?”

by

What I was after

Inspired by my recent love of cooking elaborate meals, I bought a sous vide (here’s a good description of why someone might want to do that and what it is, if you’re interested). After cooking my first meal using a regular pot, I thought surely someone had thought of a more manageable way to cook with this instrument and I was right.

The result(s)

Anova, popular sous vide manufacturer, had published a helpful guide in their blog called Making the Most of Your Sous Vide Container or Vessel – Part 1 by Chef Nicole.

The important bits

After sifting through all of the information and comparing Amazon reviews, here’s the long story short version of where I netted out with my setup:

  • The best things to cook in are the large Rubbermaid tubs (or Rubbermaid Commercial Space Saving Food Storage Container, for long).
    • I recommend the 12 quart or the 18, the Anova can handle a maximum of 20 quarts of water
    • The 18 quart requires a lot of water (maybe obvious), which is excessive for a lot of meals, so I prefer the 12 (I bought both)
    • Always cook with the container on a trivet
    • For our purposes, we won’t worry about the type of plastic Amazon reviewers are concerned Rubbermaid is using for these tubs as our food will never come in direct contact with them
  • Get the Rubbermaid lid too (this one fits both the 12 quart and 18) and cut a hole in it for your sous vide to poke out; this’ll help retain heat.
  • Get this rack (Seville Classics SHE14050 Kitchen Pantry Organizer) to go in the tub to clip your food to, it’s prevents your food from floating around.
  • Buy some clips to clip your ziplock or heat-sealed bags to the rack.

This is what my setup looks like in both the 18 quart and 12 quart varieties – totally worth the investment in the extra gear for me:

This slideshow requires JavaScript.

Note: This post is not sponsored, it falls under the same “I researched this, so maybe other people might be interested too” stream of thought as the rest of this site. I did use affiliate links for the Amazon products because, why the heck not? But these are the actual items I bought and use.

“How to mass-delete old Tweets on Twitter?”

by

What I was after

Like a lot of people who joined Twitter when it first started picking up steam, I used it for a lot of stupid status updates much in the same way that people used Facebook statuses. It was time to do a purge. But going through your Twitter history and deleting old tweets one at a time is a pain in the neck; surely there must be an easier way…

The result(s)

I stumbled upon Cardigan: a no bullshit tweet purger with a simple mantra, “Cardigan helps you find and delete old tweets.”

The important bits

Basically, with Cardigan, you authorize their web app to access your Twitter account, it imports all of your tweets into their system, and you can go through and multi-select old messages and mass delete them. It really is a no-frills system, so there’s not a lot of room for confusion.

Two notes worth mentioning:

  1. Your old Twitter messages may be deleted from your profile, but they likely still exist in an archive of the web somewhere. This will just help the embarrassing ones to not be so easily and readily available and associated with your profile.
  2. You may want to revoke access to Cardigan in Twitter after you’re done purging to play it safe.

Happy purging.

 

“How to backup Android Wear 2.0”

by

What I was after

I was upgrading my phone and had forgotten the extreme annoyance of not being able to migrate my watch to the new phone without factory resetting it. I was looking for a way to backup the device so that I didn’t have to reinstall apps and set all of my preferences over again.

The result(s)

The first result that popped up promised an even better solution, “Pair Android Wear Watches to New Phones Without Factory Resetting” on the XDA developers forum by Adam Conway. I figured that, if this worked, it’d be even better than a backup / restore, since Android devices are notoriously bad at doing thorough 1-for-1 restorations (part of the headache of getting a new phone).

The important bits

The solution involves using Android Debugging Bridge (ADB) commands to trick your watch into forgetting your previous device and opening up the pairing function again. It’s straight forward enough that anyone can do it if they follow the instructions attentively. It worked for me on Moto 360 2nd gen running Android Wear 2.7.

  • Download ADB tools. Adam recommends the third-party Minimal ADB and Fastboot Kit (Windows), but you can get the tools from Google for free as well.
  • On your watch, go to Settings \ System \ About and tap Build number until you see a notification that says “You are now a developer.”
  • Go to Settings \ Developer options and enable ADB debugging and Debug over Wi-Fi – wait until you see an IP address appear under the toggle.
  • Open ADB on your computer, you should see a command line, and type:
    adb connect 192.168.1.100:5555

    Replacing the IP address with the one shown on your watch and press Enter. Accept the prompt on your watch to connect.

  • Disable Bluetooth on your phone.
  • In ADB, type:
    adb shell "pm clear com.google.android.gms && reboot"

    Press Enter. Your watch will hang for a minute and then it should reboot.

  • After your watch is running again, connect to it in ADB like you did in step 4, accepting the prompt on the watch to connect.
  • In ADB, type:
    adb shell "am start -a android.bluetooth.adapter.action.REQUEST_DISCOVERABLE"

    Press Enter.

  • After a moment, toggle Bluetooth back on on your phone and open the Android Wear app to pair your watch as if you were pairing a new device. It should be discoverable and pair without a hitch. It did ask me to re-sync my Google account, but ultimately the watch is working with the new phone and nothing on the watch itself changed or had to be recalibrated.

Check out Adam’s original post for more context and an explanation for why this works.

“How to automatically add version to WordPress CSS”

by

What I was after

On a site that I had in beta, I was making (relatively) frequent changes to the CSS file, but had caching enabled on the server. So that visitors would benefit from always loading the most recent version of the page’s CSS (and not a stale copy that might have had a few unintended behaviours), I wanted to add a version number to the CSS file in my theme’s header.php file. I didn’t want to use the day’s date as the version number (a frequent Google solution), for example, as that could be taxing on the server, and I didn’t want to modify it manually every time I updated the CSS file. So it seemed that the easiest and best way would be a lightweight way of calling the file’s last modified date and appending it to the file name.

The result(s)

After a few searches, the best option for the way the site had been set up was the first result for “add file modified date to css wordpress”, which was Force CSS changes to “go live” immediately by Mark Jaquith. His solution is simple, automatic, and quick to apply.

The important bits

Of course, the code might change slightly based on how you have your stylesheets set up relative to your theme folder (so modify it based on where you have your CSS file stored and what you’ve named it), but in essence, simply replacing your normal <link rel=”stylesheet” href=”xyz.css” type=”text/css” /> with the following works like a charm:

<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/styles/main.css<?php echo '?' . filemtime( get_stylesheet_directory() . '/styles/main.css'); ?>" type="text/css" />

The above generates the following call on the front end, notice the version number that I’ve bolded:

<link rel="stylesheet" href="http://YourDomain.com/wp-content/themes/YourTheme/styles/main.css?1467917567" type="text/css">

When a new main.css file is uploaded, the version number will change automatically and the visitor’s browser will load the most recent version automatically. Thanks, Mark!

“Reverse video photoshop” (or How to reverse video frames to create a better looping GIF)

by

What I was after

Looking at my Timeline in Photoshop, I couldn’t see an option to reverse my video in order to create a slightly smoother looping GIF of something embarrassing my friend did (you know, the best catalyst to learn something new). Basically, I wanted to accomplish what Boomerang for Instagram does since the video was not conducive to being looped directly start to finish and over again due to camera zoom (I mean, I could have done that, but it would have been a more abrupt loop).

The result(s)

I found that the first result on Google for my search, a YouTube tutorial called 0400 Photoshop : How to reverse a video sequence by user EPFLDITSUP did a decent job of explaining how to accomplish the task through a kind of indirect workaround method.

Watch the video yourself here if you like, and see my summary for a list of steps if you can’t be bothered:

The important bits

In essence, the video tells us to:

  • Open our video file, find and cut the part we want to loop and export it as a new video (File \ Export \ Render Video)
  • Create a new document importing the cut video as layers (File \ Import \ Video Frames to Layers)
  • In the Timeline panel (Window \ Timeline), click the menu option on the top right and select Select All Frames
  • In that same menu, select Copy Frames
  • In that same menu again, select Reverse Frames
  • In that same menu again, select Paste Frames…

There you go, you’ve now got the video going front-ways then back-ways. Export your GIF and laugh at your friend’s shame.

 

“Style bullet points CSS” (or How to style coloured bullets without using image assets)

by

What I was after

One of the sites I was working on needed green bullets for unordered lists. I know there are two common workarounds to achieve this without making the text in the list items green: using an image as the list-style-image or adding span tags within the list item and targeting span tags with a specific color attribute. I didn’t want to rely on images because I felt it made the code less clean and the span tag workaround was not an option due to the non-technical authors who would be publishing posts.

The result(s)

Google’s fifth result, How to set Bullet colors in UL/LI html lists via CSS without using any images or span tags [duplicate] (http://stackoverflow.com/questions/5306640/how-to-set-bullet-colors-in-ul-li-html-lists-via-css-without-using-any-images-or), gave me the answer I was after with an entry from Lea Verou.

The important bits

Here’s what I pieced together from several comments and some tinkering to land with a version that was essentially the same result visually as the built-in unordered list style, but with the green bullet made of a text character and the authors not having to worry about any special styling during their content creation:

ul {
  list-style: none;
  padding:0;
  margin:0 0 10px 10px;
}
ul li {
  padding-bottom:4px;
  padding-left: 2em; 
  text-indent: -2em;
}
ul li:before {
  content: "■"; 
  font-family:"Arial Black", Arial;
  color:#8dc63f;
  padding-right:1.5em;
  position:relative; 
  top:-.05em;
}
ul li ul {
 margin:8px 0 0 10px;
}

 

“Delete my local branch and then re-track it from scratch (Git)”

by

What I was after

In this case, I was working on a site where my local master branch (Git) had somehow become almost 50 commits behind and I also had some unusual conflicts. Knowing that the remote master branch was current and had all of my previously merged changes already, I was looking for a way to reset my local master branch to match the server side without doing a typical pull request (since I was getting too many weird conflicts).

The result(s)

I ended up asking a friend to remind me of the command since we were chatting. He pointed me to Reset local repository branch to be just like remote repository HEAD (http://stackoverflow.com/questions/1628088/reset-local-repository-branch-to-be-just-like-remote-repository-head).

The important bits

In the end, with the master branch checked out, it was as simple as running two commands:

git fetch origin
git reset --hard origin/master

“How to put blinking type character on site”

by

What I was after

I was trying to create the blinking “|” character in the header of this web site without putting too much load on it because it’s not really a major element of the site. Because of the potential for abuse and poor user experience, blink is a contentious topic online amongst developers.

The result(s)

In the 5th result on Google, Alternative for <blink>, user edCoder redirects to a Stack Exchange answer by pstenstrm to the question How to make text blink on website? [duplicate] (http://stackoverflow.com/questions/20270096/how-to-make-text-blink-on-website/20270551#20270551).

The important bits

The relevant bit in the code was setting up a character you want to flash and then surround it by a span tag with a unique class (like blinking-text), then add the following to your CSS:

.blinking-text {
 -moz-animation-duration: 600ms;
 -moz-animation-name: tgle;
 -moz-animation-iteration-count: infinite;
 -moz-animation-direction: alternate;
 -webkit-animation-duration: 600ms;
 -webkit-animation-name: tgle;
 -webkit-animation-iteration-count: infinite;
 -webkit-animation-direction: alternate;
 animation-duration: 600ms;
 animation-name: tgle;
 animation-iteration-count: infinite;
 animation-direction: alternate;
 }
 @-moz-keyframes tgle {
 0% {
 opacity: 0;
 }
 49.99% {
 opacity: 0;
 }
 50% {
 opacity: 1;
 }
 99.99% {
 opacity: 1;
 }
 100% {
 opacity: 0;
 }
}
@-webkit-keyframes tgle {
 0% {
 opacity: 0;
 }
 49.99% {
 opacity: 0;
 }
 50% {
 opacity: 1;
 }
 99.99% {
 opacity: 1;
 }
 100% {
 opacity: 0;
 }
}
@keyframes tgle {
 0% {
 opacity: 0;
 }
 49.99% {
 opacity: 0;
 }
 50% {
 opacity: 1;
 }
 99.99% {
 opacity: 1;
 }
 100% {
 opacity: 0;
 }
}

“Adjust font baseline css”

by

What I was after

I knew there was a way to shift the baseline of a character within a paragraph using CSS, but I couldn’t remember the code for it. I wanted to shift the search logo in my post titles on this site so that I could call it as a character, but make it smaller than the post title without it looking weird for being so low compared to the text…

Baseline_shift_diagram

The result(s)

The first result in my Google search, Improve your web typography with baseline shift (https://stuffandnonsense.co.uk/blog/about/improve_your_web_typography_with_baseline_shift) gave me exactly what I was looking for.

The important bits

The relevant bit for me was that if you made a child of a parent class and positioned it relative, you could adjust the top value to shift the baseline, for example:

.content span { position:relative; top:-.2em;}

So if you had a paragraph with the class content, and inserted a span tag within it, the baseline of the span tag would be shifted up.

<p class="content">Here is my test content <span>wow, what shift!</span></p>

Output: Here is my test content wow, what shift!