Category Archives: Technology

What intelligent machines can learn from a school of fish

Wow!

What intelligent machines can learn from a school of fish

You can find all my shares on my Facebook Page

Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

10 Unusual Things I Learned From Mr. X – Altucher Confidential

Ep. 265 – 10 Unusual Things I Learned From Mr. X – Altucher Confidential

You can find all my shares on my Facebook Page

Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

Linux Startup Email

Want to receive an email any time your linux server reboots? Just create this script…

sudo nano /usr/local/sbin/startupemail.sh

Here’s the code for the script…

#!/bin/sh

# Lets things startup
sleep 60

# Get info
IP="$(ifconfig | grep -A 1 'eth0' | tail -1 | cut -d ':' -f 2 | cut -d ' ' -f 1)"
HOSTNAME=`hostname`

#Send email
echo "IP: $IP, Host: $HOSTNAME" | mail -s "Server Started" me@there.com

Make sure to make it executable…

sudo chmod u+x /usr/local/sbin/startupemail.sh

Then add it to your /etc/rc.local file

Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

Find the Members of an Active Directory Group

The simplest way to get the list of users in an Active Directory group is to use the following command right from the command line:

NET GROUP "my_group" /DOMAIN

And yes, that is the work “DOMAIN”, not the domain you are in. The only value to change in the command is my_group

Ref: Is there a way to view the members of an Active Directory group if you aren’t a domain admin and can’t log into a domain controller?

Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

OwnCloud webapp not reflecting true list of files

If you’re using OwnCloud and have a process whereby your add or remove files from directories via some sort of server process, you may find that you need to force OwnCloud to update/rescan the file listing. To do so you can manually run the following command…

sudo -u username php /path/to/owncloud/console.php files:scan --all

You may also want to consider adding it to the crontab for “username” on a daily basis.

Thanks to this site for pointing me in the right direction.

Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

Sendmail isn’t sending to domain.com : Linux

Say you’re using sendmail to relay email on a web server that you own that’s named “domain.com”, and email is being delivered fine to any domain except domain.com. What could be the problem?

  1. Rename your server. No server should be named with an actual domain name.
  2. Change /etc/hostname to the new name for your server
  3. Update /etc/hosts to remove the domain name and replace with the new hostname
  4. Remove the domain name from /etc/mail/local-host-names
  5. Restart sendmail “sudo service sendmail restart”
  6. Restart your server “sudo reboot”

Once you’ve done that test sendmail out like so…

echo "command line test" | mail -s "Sendmail test" me@domain.com
Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

Improved Linux command history

With four lines setup one time you can type the beginning of a command (ex: “ls”) then press the up and down arrows to see the most recent commands containing the text you typed (ex: “ls ~/scripts”) making it much easier to find what you’re looking for. To make this happen, create a text file called .inputrc in your home folder and put the following four lines inside:

"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on
Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

Apple vs FBI

So my mom asked my opinion on the current standoff between Apple and the FBI over their insistence on building a back door into the iPhone “just this once” (wink, wink, nudge, nudge). As I said to her…

I completely agree with Apple’s stance. Once they create such a method to circumvent the security on the phone, I guarantee it will be ordered to do so from now until eternity. That is unless you believe everything the government and law enforcement tell you. In that case, then yes it will be just one time (wink, wink, nudge, nudge).

Let’s also address certain politicians insistence on “opening up” security and “using our heads”…

START: Sarcasm and Contempt
Yeah, let’s open up security all over the place. In fact, then no one will ever be able to transmit anything securely ever again. Hint: “open up” just means lets build in a vulnerability, a bug – intentionally!! You didn’t want your credit card info submitted securely now do you? Probably should let the gov’t be able to scan all your photos and financial documents, and travel plans, and basically anything that’s stored digitally. Not like that’s everything now a days.

Not that hackers or “bad guys” would take advantage of that or anything. Gahh!!

END: Sarcasm and Contempt

Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

Access a Console (including CYGWIN) from Notepad++

If you’re regularly in Notepad++ you may find the NPPConsole to be a huge help. With it you can access a windows console or even cygwin if you prefer (I do). To get started…

  1. Download the NPPConsole Plugin
  2. Extract the dll to your n++/plugins directory
  3. Restart Notepad++ if it was already running
  4. Use the Plugin Manager to make sure the plugin is available

If you want to just use the Windows console (DOS) you should be all set. To integrate with CYGWIN…

  1. Choose Plugins -> NppConsole -> About…
  2. In “Command to run” enter: C:\cygwin\bin\bash.exe ${–login -i}
  3. In Line number pattern after file name enter: :${LINE}
Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

Windows Batch File (.bat) Not Running

If you’ve ever accidentally set batch files to open in a text editor, and now are unable to run them anymore you have to use the registry editor instead of the Control Panel file associations. As pointed out in this article

  1. Click on “Start”->”Run” and type in “REGEDT32” and press Enter to start the Registry Editor.
  2. Find the following key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.BAT\UserChoice
  3. Delete the key named “UserChoice”
Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.