Discussions

Selecting a running position of the returned row in MSSQL

Posted by on 3:53 pm in Database, MSSQL | 0 comments

For some reason this concept is hard to summarize in one line. Basically we’re looking to return how many rows are in the table before the row returned in the result. Sort of like what position the rows is in line. If we have a table like this: Row: 1,2,3 Row: 2,4,5 Row: 3,6,7 And we want to find out the position of row 2, then it’s fairly simple because the primary key will tell us what order it is. However, if you delete row 1, then row 2 becomes the first row in line. The following sql will tell you how many rows are left...

read more

Give Me Your Eyes

Posted by on 4:35 pm in Opinion | 0 comments

I don’t usually browse around YouTube, but I was at a youth conference a few weeks ago and the speaker played this video. I had heard this song before, but I really never dove into the lyrics. Upon doing so, I think it’s a great song. It could be sung as a prayer or just a reminder to take the time and don’t get into our clamshells when we see something that we could help with. If we see things through the eyes of God, then how could we ignore some of the things we see every day? There are some situations that we...

read more

Adding a second hard drive in Ubuntu

Posted by on 4:09 pm in Operating Systems, Ubuntu | 0 comments

Adding a second hard drive in Ubuntu

Adding drives in Ubuntu is fairly straightforward. When you install them, Ubuntu assigns them an sdX identifier, where X is a,b,c, etc. depending on how many drives you have installed. These instructions work with whatever number harddrive you’re installing, just change the b to whatever letter Ubuntu has assigned your new drive.             Steps: Find out what your new drive is assigned. You’ll see a drive with no details. That should be your new drive. sudo fdisk -l Start the formatting. sudo...

read more

Creating a strong SSH key pair for file transfer without a password

Posted by on 3:18 pm in Operating Systems, Ubuntu | 0 comments

Creating a strong SSH key pair for file transfer without a password

Passwords really get in the way of scripts that have to automatically transfer files. They can also be annoying if you’re logging into the same machine all the time. If you create a key pair between two machines however, the account you created it for won’t have to provide a password when accessing the other machine. Note these are 1 way, meaning if you put computer A’s ssh key on computer B, A can log into B without a password, but B still needs a password to log into A. Steps to set it up Create the Key Pair.  Just hit...

read more

Binding NIC cards in Ubuntu to create redundancy

Posted by on 8:56 pm in Operating Systems, Ubuntu | 0 comments

If you have 2 network interfaces in Ubuntu, you may want to bind them together to create redundancy. If you bind two NICs together, 1 can be unplugged, or unavailable to the network and the IP address will still broadcast through the other NIC. So here’s how to do it in Ubuntu. Install ifenslave: sudo apt-get install ifenslave Add some settings into the /etc/modules file: echo “bonding mode=active-backup miimon=100 primary=eth0″ >> /etc/modules Note that “active-backup” means that the second NIC is not used...

read more

Toshiba Thrive 10.1 Tablet

Posted by on 2:22 am in Opinion | 1 comment

Toshiba Thrive 10.1 Tablet

So I was walking through Staples the other day and I saw the Toshiba Thrive on display. It has a 10.1 inch screen so I decided to take a look. Priced at $400 I wasn’t expecting it to have the responsiveness of the ipad, but it really did. I would seriously put this on my possible list for tablets because of the price and responsiveness. However, I hear that ipad may be putting out a model priced at the same range, so I may just wait a little longer and see if that rumor is true.

read more

Bill Gates does more good in the world

Posted by on 1:57 am in Opinion | 0 comments

Regardless of my tendency to shy away from Microsoft products, you can’t argue with the fact that Bill Gates isn’t sitting on his money doing nothing. He’s doing good things with it. Just look at the article below. He pitched in over 1 billion dollars to make this project work. That’s an incredible amount of money from 1 donor. Because of his efforts, the lives saved are measured in hundreds of thousands. It boggles the mind that he has that much money, but to just write out a check that saved hundreds of...

read more

Apache Password protecting a Directory

Posted by on 9:45 pm in Apache, Web Servers | 0 comments

Password protecting a directory in Apache means that a username/password prompt will appear if someone trys to access any of the files in that directory, or that directory itself. They don’t have to do it every time they load a new page, if you for instance have an application in the directory, as it creates a session and saves the fact they authenticated themselves. To set this up, add the following into your apache site. Most likely it will be the sites-available/default <Directory /path/to/directory/to/protect/> AuthType...

read more

Apache Redirect to Secure Link

Posted by on 9:22 pm in Apache, Web Servers | 0 comments

If you have a directory that you want to force users into an SSL connection, the easiest way is to use a .htaccess file if your host allows it. The following will force any page to redirect to https:// if they aren’t on it already. RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} If you want to exclude a directory or filename specifically, then just add in another rewrite condition as shown below. RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI}...

read more

MySQL Update Row if Key Exists

Posted by on 11:46 pm in Database, MySQL | 0 comments

Many times you have to do a query before you do a write action to a database because you have to see whether or not a row exists for the data you want to put in. If it does exist, you’d then do another query that was an update, otherwise you’d have to do an insert. Well if you want a quicker way, and you don’t need to use operators like “Update `column`+1″, then “REPLACE INTO” is the function for you. It works exactly like an insert, except that if the primary key already exists, it overwrites the...

read more