Comments Off on Updating IP Address In No-IP.com With Raspberry Pi

Updating IP Address In No-IP.com With Raspberry Pi

I previously wrote how to use ddclient on a Raspberry Pi to updating an IP address In OpenDNS. Shortly afterward I added updating the IP of my noip.com domain into my configuration but never documented it… until now.

If you don’t yet have ddclient installed, follow steps 1, 2, 7, 8, 9 & 10 in the previous post to install it. Once done, come back here and do the following:

  1. At the command line type the following and hit enter:
    sudo nano /etc/ddclient.conf
  2. Enter the following in the ddclient.conf:
    #noip
    protocol=noip
    use=web
    ssl=yes
    login=USERNAME
    password=PASSWORD
    HOSTNAME

    USERNAME should be your noip.com username.
    PASSWORD should be your password.
    HOSTNAME should be the no-ip hostname you want to update.

  3. Hit CTRL-X to exit nano. When prompted to save be sure to say yes and hit enter to confirm the file name.
  4. From the command line type the following and hit enter:
    sudo nano /etc/default/ddclient
  5. Restart ddclient by typing the following at the command line and hitting enter:
    sudo /etc/init.d/ddclient restart
    If all went well you’ll see the following line and then be back at the command line:
    [ ok ] Restarting ddclient (via systemctl): ddclient.service.


Comments to this post

Tags: , ,
Comments Off on Using YOURLS in a Subdirectory – Revisited

Using YOURLS in a Subdirectory – Revisited

I’ve written before about how to use the YOURLS URL shortener from a subdirectory. In fact, I’ve written about it twice. First I wrote about how to get the admin and other functions to work properly. Later, I wrote how to get the API to work properly when installed in a subdrectory.

But in the latest release, 1.7.9, the code has changed. This necessitates a slight change to the previous instructions.

My previous posts referenced changes to be made in the includes/functions.php and includes/functions-api.php files. The same files are needed here but instead of searching for YOURLS_SITE and replacing it with a substr() version, search for yourls_get_yourls_site() and use substr() on that.

Using the same example of my previous posts, let’s say that YOURLS_SITE is set to “http://example.com/subdir” (where “subdir” is the name of the directory where YOURLS is installed). Substitute the following code every time yourls_get_yourls_site() is mentioned in both files (except for the yourls_admin_url() and yourls_site_url() functions in includes/functions.php):

substr(yourls_get_yourls_site(), 0, 18);

The above is enough if you already had YOURLS set up this way in previous versions. But if you’re setting this up for the first time, be sure to add the following to the .htaccess file in the root:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9A-Za-z]+)/?$ /subdir/yourls-go.php?id=$1 [L]
RewriteRule ^([0-9A-Za-z]+)\+/?$ /subdir/yourls-infos.php?id=$1 [L]
RewriteRule ^([0-9A-Za-z]+)\+all/?$ /subdir/yourls-infos.php?id=$1&all=1 [L]



Comments to this post

Tags:
Comments Off on Do We Still Believe in Innocent Until Proven Guilty?

Do We Still Believe in Innocent Until Proven Guilty?

Everybody deserves the benefit of the doubt. The United States criminal legal system seems to be built with this in mind. Everyone is innocent until proven guilty in a court of law. So why is it ok for them to be guilty until proven innocent in the court of public opinion?

Much of the talk I’ve heard in the media when dealing with high profile stories over the last few years seems to side with the accused even before any proceedings (whether it be an investigation, trial, hearing, etc.). Whether it’s a contested election or an athlete’s actions or anything else, shouldn’t we be assuming the subject of accusations is innocent until proven guilty?

I’m not saying to silent the accusers. The accusers certainly need to be given an opportunity to tell their story and submit any corroborating evidence of their accusations. They should be given every opportunity to confront those they are accusing with whatever it is they are alleging the accused has done.

There are also cases of multiple accusers. While I believe that where there is smoke there is very likely fire (even if the fire is just the accused putting themselves in a situation where it could even be alleged they are guilty of something even if they’re not), I still believe we, as a society, need to view the accused with just as much open mindedness as we do the accusers.

I’m obviously not talking about a cases where there are multiple witnesses to corroborate the claims of the accuser. Yes, even in those cases the accused needs to be proven guilty in a court of law. But it is certainly understandable for the court of public opinion to make a judgement in such cases.

I’m not talking about a single case so please don’t get me wrong an accuse me of being judgmental for or against a specific instance you think I may be talking about. I just see a trend that I find a bit troublesome.



Comments to this post

Tags:
Comments Off on Learning How to Run a Non-Profit

Learning How to Run a Non-Profit

Through a series of odd events, I recently found myself being named the president of a small non-profit organization that I have done volunteer work for over the last several years. Though the discussion about me taking this position was not completely unexpected, the timing and circumstances were.

With no previous experience overseeing an organization of any kind, I was thrown into an intense learning on the job experience. As such, in the few months that I’ve occupied this position I’ve learned a lot. Here are just a few of the things I have learned so far:

1 – Everybody has an opinion and that’s ok: Everybody involved with a non-profit organization is there because they care. As such, they believe very strongly in their opinions. Those opinions may clash with other people’s opinions but there’s nothing wrong with that.

2 – Managing personalities is a big part of the job: When I took over the presidency of the organization, I knew that managing personalities would be part of the job. I figured it would be about 50% managing situations and 50% managing personalities. It turns out that managing personalities is more like 80% of the job (possibly more). Knowing the personalities of the people you are dealing with is key. Some people require more conversation. Other people require more ego stroking. Still others require to be left alone as much as possible. Knowing the personalities and tendencies of the people you need to deal with makes navigating the labrynth of issues that come up that much easier to deal with.

3 – Delegate and do not micromanage: As the president, it’s obviously important to know what’s going on. But it’s not necesary to know every detail about every issue. As mentioned above, everybody is doing what they do for the organization because they care. Most of the time they know what they’re doing so there’s usually no need to intercede beyond getting a regular update on progress. Most often, people will reach out to you if they have an issue that requires a little more thought.

These are just a few of the things I’ve learned so far. I’m sure theres much more coming.



Comments to this post

Tags: ,
Comments Off on Running YOURLs API from a Subdirectory Install

Running YOURLs API from a Subdirectory Install

Some time ago I wrote about how to generate root short URLS from a YOURLs subdirectory install. For example, if you have YOURLs installed in the subdirectory ‘subdir’, by default your short URLs will come out as example.com/subdir/xxx. But example.com/xxx is so much nicer. The post details exactly how to get the nicer URLs.

But recently I wanted to use the YOURLs API to expand a URL and it was failing. After some digging, I figured out why and how to fix it.

In the includes directory (yourls/includes) you will find a file called functions-api.php. This file uses the same YOURLS_SITE setting we saw in the previous post. We just need to replace it the same way we replaced it the last time.

Just as last time, let’s say that YOURLS_SITE is set to “http://example.com/subdir” (where “subdir” is the name of the directory where YOURLS is installed). Substitute the following code every time YOURLS_SITE is mentioned (at the time of this writing there are only 3 occurrences):

substr(YOURLS_SITE, 0, 18);

This essentially replaces “http://example.com/subdir” with “http://example.com” (the first 18 characters of “http://example.com/subdir”). The number 18 will be different depending on the length of your domain name (for instance, “http://golddave.com” is 19 characters so I used the number 19).

Now when you try something like http://example.com/yourls/yourls-api.php?signature=SIGNATURE&action=expand&shorturl=http://example.com/KEYWORD&format=simple (where SIGNATURE is your secret signature token and KEYWORD is the keyword to the short URL) you will get the actual long URL instead of a 404.



Comments to this post

Tags: