• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

Class “Some/Namespace/App.php” not found (only on server)

August 11, 2024 by Webhead

The Problem

Everything works fine on your Mac OS setup, but for some reason, on your Linux server you get the error below. All file names look correct, case sensitive and all.

Class "Some/Namespace/App.php" not found.

The Solution

When you rename a file on Mac and it’s just changing the case, git won’t pick it up. So while you think it’s renamed on the server, it may not be! When renaming a file and it’s just changing the case, use:

git mv app.php App.php

Filed Under: Uncategorized Tagged With: git, linux, macOS, php

Thisisunsafe

May 23, 2022 by Webhead

Problem

Sometimes you need to run https sites locally and you can’t get by Chrome’s warning of NET::ERR_CERT_INVALID. Google has removed the link to just bypass this warning recently.

Solution

While this is more of a workaround than a solution (you should resolve the invalid cert), you can get by Chrome’s security warning by typing “thisisunsafe”. Don’t type it in the address bar, just have the window in focus. You won’t see what you’re typing, but when you finish typing the browser window will reload and display the site.

Filed Under: Tools Tagged With: chrome

Workaround to WordPress Custom HTML block error

March 21, 2022 by Webhead

Problem

Sometimes you just want to write part of an HTML code block to maybe wrap the next block in. Or some small part of HTML that may not make sense to the editor. It doesn’t matter though. The block editor will throw an error like “This block contains unexpected or invalid content”. Irritating.

Solution

One solution is to create a simple shortcode and return the html you want to write out. Shortcodes let you return whatever HTML you want and the block editor won’t know about it.

Filed Under: Coding Tagged With: block editor, wordpress

Free up Email Storage

June 2, 2021 by Webhead

Now that Google Photos is no longer free, Google storage will be eaten up pretty quickly if you’re still using them. One area you can free up some space is your email in gmail.

Search, Select All, Delete

To reduce space, first you would need to find the emails you want to remove. Searching is Google’s specialty so this is no problem. Google lists the search operators you can use on this page. But you can also use some of my hand dandy searches below.

Once you find the emails to delete, you can select all by checking the select all checkbox in the upper left corner, then you can click on “Select all conversations that match this search”.

Now that you have all the email you want to delete selected, click on the Trash icon to delete. You’ll have 30 days to change your mind. After that it will be deleted forever. Of course you can also go into your trash and Delete Forever right now.

Now onto some helpful handy dandy search queries:

Search for the big stuff.

Find all emails with attachments larger than 5mb, 10mb, or larger and older than so many years. A pretty conservative search would be to find attachments 15mb or larger older than 4 years old. To find more mail, reduce the size or the years.

size:15mb has:attachment older_than:4y 


Search for the un important stuff

No one reads all the promotions that reach your mailbox, so why keep them? If your gmail is automatically categorizing emails, you can find all your promotional emails older than so many years and remove them.

category:promotions older_than:2y


Search for that specific one

Sometimes deleting a category may be too much. You can also target emails from specific senders or unread emails.

from:([email protected]) older_than:2y is:unread 


Filed Under: Random Thoughts Tagged With: gmail, google

Sorry, This Content Could Not Be Embedded

September 9, 2020 by Webhead

I was trying to embed a youtube video in a post and it said “Sorry, this content could not be embedded”. The console showed a 404 error trying to connect to wp-json/oembed/1.0/embed.

I tried another video and it worked. According to this stack exchange post, the first video I was trying to embed probably didn’t allow for websites to embed their content.

Filed Under: Coding Tagged With: embed, wordpress, youtube

Javascript Date parsing UTC or Local?

June 29, 2020 by Webhead

When parsing a string in a javascript Date object, if you don’t set a time, the string is taken in as UTC. Then when retrieving it, it displays as local time.

new Date('2020-01-01');

will return “Tue Dec 31 2019 14:00:00 GMT-1000 (Hawaii-Aleutian Standard Time) {}” when the current time is after 10am HST.

However,

new Date('2020-01-01 00:00:00');

will return “Wed Jan 01 2020 00:00:00 GMT-1000 (Hawaii-Aleutian Standard Time) {}” anytime, even after 10am HST.

Obviously, this is due to timezones. This stack overflow gets into the nitty gritty details:

https://stackoverflow.com/questions/5619202/converting-a-string-to-a-date-in-javascript

Filed Under: Coding Tagged With: javascript

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Interim pages omitted …
  • Go to page 40
  • Go to Next Page »

Primary Sidebar

Topics

apache apple block editor chrome cms css debug eCommerce embed firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery linux localization macOS mac os x ms sql mysql open source optimize php php 7.2 rest api seo svg tinymce woocommerce wordpress wpengine xss yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools
  • Uncategorized