Wordpress

A small WordPress plugin to create a BOFH excuse using a shortcode anywhere on your WordPress website shortcodes are supported. Usage The rolling stones concert down the road caused a brown out Output Example

Read More WP-BOFH

I’ve been trying to learn some Python and have been tinkering with the requests module. Here is how I am able to log into a webpage, such as WordPress. import requests url = “https://techish.net/wp-login.php” redirect_to = “https://techish.net/wp-admin/” with requests.Session() as session: post = session.post(url, data={ ‘log’: ‘admin’, ‘pwd’: ‘password’, ‘redirect_to’: redirect_to }, allow_redirects=True) get =…

Read More Login to WordPress from Python

I’m testing out the development version of TwentyTwenty theme from WordPress on this site. I noted that calls to /assets/fonts/inter/Inter-upright.var.woff2 were causing some grief for Apache2 (Error 500): AH00681: Syntax error in type map, no ‘:’ in /var/www/clients/client0/web1/web/wp-content/themes/twentytwenty/assets/fonts/inter/Inter-upright.var.woff2 for header wof2 Cursory Google search indicates that Apache2 is interpreting filenames with .var.* in the name…

Read More WordPress TwentyTwenty Theme – Inter font Apache2 error

I created a WordPress plugin based on a personal dilemma I ran into with my site being stripped of backslashes. Upon post save, it converts backslashes to HTML entity ] which is what will be stored in the database. The plugin is available on GitHub at https://github.com/rjkreider/wp-preserve-backslashesHere’s the function if you want to just drop…

Read More WP Preserve Backslashes

Post thumbnail

Discovered that my most recent conversion from SQLite to MySQL seems to have screwed up my backslashes in all my posts that have backslashes. This is bad because my code snippets should not be copy & pasted and run at face value unless you verify the code!  It could seriously break shit. Ugh.  This is…

Read More All my backslashes are gone in WordPress. Yikes.

Just finished migrating my website from SQLite to MySQL. What a rush. (lol) It was actually not as bad as I thought. A lot of sed, grep and other sorcery involved; especially in transforming of SQLite statements to MySQL. Some quick commands I used: sqlite techish.db .dump > production_2018-08-23.dump.sql I found that it used quotes…

Read More WordPress SQLite to MySQL Migration Complete