UserScript: Back To Old Reddit (Simple Redirect)

Here’s a extremely small but working UserScript to redirect you to “old.reddit.com” if the URL you’re currently are visiting includes “www.reddit.com”.
It doesn’t matter if the URL is to a Sub-Reddit, a post on Reddit or a comment.

I’ve only tested it with “ViolentMonkey” but I think it should work with other UserScript plugins too.

// ==UserScript==
// @name Back To Old Reddit
// @description Redirect you from new Reddit to old.Reddit.com
// @namespace https://www.nordicnode.com/
// @version 0.1
// @match *://www.reddit.com/*
// @author https://www.nordicnode.com/
// @grant none
// @copyright 2019, NordicNode - https://www.nordicnode.com/
// @run-at document-start
// ==/UserScript==

var currentURL = window.document.location.toString();
if(currentURL.includes("://www.reddit.com")) {
var newURL = currentURL.replace("://www","://old");
window.document.location.replace(newURL);
}

Add a “Delete Post” Link to your WordPress Posts!

Add a simple delete link right on your website that is running WordPress. Tested with WordPress version 5.1.

Since the PHP code is written by me it looks like crap, but it doesn’t really matter since the admin is the only one who will see it.

Add this code inside the WordPress loop and reload your website.
If you have logged in as Admin you should see a “[Delete Post]” link somewhere.

When you click it a dialog will pop up, asking you to confirm to delete the post.
I didn’t want the page to reload every time I did delete stuff, that’s why the small iframe is added. It will simply load the delete link inside it. (Told you it was crap code, but it works.)

WordPress Code:
<?php if ( is_super_admin() ) { ?>
<p><a onclick="return confirm('Do you want to delete this post?')" href="<?php echo get_delete_post_link( $post->ID ) ?>" target="deleteframe">[Delete Post]</a></p><iframe name="deleteframe" width="200px" height="35px"><a href="https://www.nordicnode.com/">NordicNode</a></iframe>
<?php } ?>

That’s it!

Free DHCP, DNS, TFTP Servers for Windows (Lightweight)

Want to setup a local DHCP server on your Windows PC?
This very lightweight application can also be setup to run servers for TFTP, DNS, SNTP and Syslog. All servers are included in one small application.

This application is called TFTPD64. It’s Open Source and the size of the installation, portable or service version is about 0.5 MB.

Continue reading Free DHCP, DNS, TFTP Servers for Windows (Lightweight)

Stop Microsoft from Spying on everything you do. (Block Telemetry)

Most people know that the Windows Operative System is sending lots of information about their users to Microsofts servers.

What kind of information are they collecting? Why do they need more than information about bugs, what version you have of their product so they can send the right ones so you can update your system and information that really is needed to use Windows from day to day.

I don’t want to send everything I type, every URL I visit, the kinds of media I’m listening to or watching. Because that is private information and I like to be able to choose what kind of stuff corporations know about me.

If you want to block some of some of Microsofts Telemetry Servers then copy the list below and paste it at the end of your HOSTS file.
You’re doing this at your own risk. I’ve done it among several other people and my PC seem to be working fine.

You first need to run Notepad as Administrator, click on Windows Start button, type Notepad and Rightclick on it and choose to run it as Administrator.

In the Notepad meny, Open this file:
C:\Windows\System32\drivers\etc\hosts

Now, copy the list below and paste it at the bottom of the file, then save it and close NotePad. Now these servers should be blocked.

Continue reading Stop Microsoft from Spying on everything you do. (Block Telemetry)

Force HTTPS and/or WWW on your WordPress site!

As you probably know by now. Google is starting to add a new ranking factor to their ever-changing algorithm.

It’s SSL that they want us to use but it’s a good thing since the data you send and receive from a server will be encrypted and a bit harder for people that might try to gather information like credit card numbers, passwords and other sensitive information.

First, make sure you’re happy with your Permalinks settings. Once that is done, open the file named “.htaccess” and after taking a backup of it, change it to the similar bit of “code” below:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# Force www
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

# Force SSL
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L,NE]
</IfModule>
# END WordPress

Just add the “Force www” part for adding www if you want it. The SSL part below is what’s important.

Save the file and try going to some of your old URLs.