NES Modding

Posted by Dave Eddy on Sep 20 2010

NES - Nintendo Entertainment System

I modded my NES back in 2005, and I still use it today to play games.

I added 12 blue LED’s to the Nintendo, and added a plexi-glass window to the top of the Nintendo to make the lights more visible and to see the game cartridge that is in the Nintendo.

I used a dremel to cut out the top of the NES and then installed the plexi-window.

There is a switch on the back that can turn on and off the lights on the NES, and it operates independently of whether or not the NES is turned on or off.

1

2

3

4


iTunes Music Sharing on Ubuntu

Posted by Dave Eddy on Sep 20 2010

Firefly Media Server

I installed the Firefly Media Server on dataDyne a couple of weeks ago. Firefly is in the standard Ubuntu repositories under the name mt-daapd, because it literally is a daap daemon. It allows you to pick a directory on your computer and share the media over the standard iTunes port (3689).

Installation was pretty straight forward, because you can connect to your computer on port 3689 and you get presented with a web interface to configure the daap share. Now, when i rsync my music from my laptop to dataDyne, the music automatically gets shared to my local network and is visible to anybody using iTunes.

Read More...


Import / Source Files in Bash

Posted by Dave Eddy on Sep 20 2010

What is importing/Sourcing?

Importing files in Bash is a way to take a bash file, and implant (import) it in another script temporarily during runtime. This can be handy if you have a file that just has a couple functions in it, and you want to use those functions (sound a lot like programming?)

How To Source/Import Files

There are two ways to import files in bash, and both do the exact same thing, they just have different syntax. You can use the source command to import a file.

source functions.sh

…or you can also use a period.

. functions.sh

Sourcing is done when bash first starts when you open a terminal or ssh into a server using the bash shell. Bash first starts, and then it sources your .bashrc file or your .bash_profile file (depending on how you login), which reads in variables that pertain to that session of bash.

Read More...


How to Use SSH Keys

Posted by Dave Eddy on Sep 20 2010

What are ssh keys?

SSH keys are used for a user to authenticate over ssh without using the standard username/password combination. Because of the nature of the cryptography used, they allow a user to login without entering a password.

An ssh key is a type of public-key cryptography, with a public and private key-pair. The private key is, like its name says, meant to be kept private. When you make a private key, you should hold onto this private key and keep it secure; it is what is used for you to prove you are who you say you are. You can think of it like your password saved in a file. It is NOT actually your password stored in a file, but I compare the two because the file should be safeguarded with the same care as your passwords.

The public key can be published, it does not need to be kept secure. The public key allows people to encrypt data, but not decrypt it. In order to decrypt the data the private key is needed, that’s why it is important to keep it secure. The private key is kept on your client computer, and the public key is kept on your remote server, that will allow you to ssh from your client to your server using the ssh key.

Read More...


How to Use Cron

Posted by Dave Eddy on Sep 20 2010

What is Cron?

Cron is a task-scheduler for Unix. Cron is used to automate processes on a computer, such as backing up files, rotating logs, or anything else you can think of. I use cron on daveeddy.com to backup wordpress and mysql databases. The simplest way to access cron and add tasks is by editing the cron table, and this can be accessed by this command:

crontab -e

This will open up a text document that holds the cron table for the current user.

To simply view the current cron table without editing it you can run:

crontab -l

Cron Users

When a script executes from cron it is executed with the same privileges as the user who owns the cron table. For instance, if login to my server as dave, and then edit the cron table to run a script, that script would run as user dave (even if I’m not logged in when the script is scheduled to run.)

Read More...


Functions in Bash

Posted by Dave Eddy on Sep 20 2010

What is a function?

A function in Bash is like a function in any programming languages. A function is a subroutine in a program, and though I wont go into detail on that here you can learn more about it at wikipedia.

How to

In bash the syntax to create a function is really simple, here is an example.

function sayHello() { echo hello; }

This creates a function called sayHello that, when called, will echo “hello” to the screen. To call this function inside a script is also simple, you treat sayHello as though it is a command that you would call just like any other in the script. For example:

#!/bin/bash
function sayHello() { echo hello; }
echo "about to call the function."
sayHello
echo "done"

Read More...


File Server - dataDyne

Posted by Dave Eddy on Sep 20 2010

dataDyne - 9.5TB network storage tank

The 250gb hard drive in my MacBook just isn’t enough anymore, so I bought some equipment to set up a NAS (Network Attached Storage). The equipment I bought:

I also bought a 4gb CF card, and a CF to IDE adaptor, because i had originally planned on using freeNAS as the operating system, and free up space in the case (by not needing a hard drive to install the operating system on). But i decided to go with Ubuntu instead, and ditch the CF card route. I chose Ubuntu because of limitations in the software raid implementation in freeNAS. FreeNAS doesn’t have the ability to grow an existing RAID, so if down the line i wanted to add another hard drive, freeNAS wouldn’t allow it, but Ubuntu would.

Read More...


Change Bash Prompt

Posted by Dave Eddy on Sep 20 2010

I configured the prompt to have a more custom feel on my servers, by adding the following line to my ~/.bashrc file.

Mike originally gave me the code, I just modified it to change the colors and the layout, check out his site at http://lightsandshapes.com

datadyne

To use this prompt design, add this line to your ~/.bashrc file.

PS1='\[\]\u\[\]@\[\][\h]\[\]:\[\]\w/\[\]\$\[\] '

Ampache Now Playing (Wordpress Plugin)

Posted by Dave Eddy on Sep 20 2010

Ampache Now Playing at wordpress.net

Description

The Ampache Now Playing (Wordpress Plugin) is a plugin for Wordpress that displays the current song playing on your Ampache server.

Features

This module can pull information about the current playing song from an Ampache server via it’s RSS feed, and display it as a widget. It can pull the song title, album, and artist, the date the song was played, and from what user agent the song is being streamed to (ie, ampache web interface, iphone, android, etc.).

Read More...


Ampache Now Playing (Drupal Module)

Posted by Dave Eddy on Sep 20 2010

Ampache Now Playing at launchpad.net

Description

The Ampache Now Playing (Drupal Module) is, like the name suggests, a module for Drupal that displays the current song playing on your Ampache server.

Features

This module can pull information about the current playing song from an Ampache server via it’s RSS feed, and display it in a block. It can pull the song title, album, and artist, the date the song was played, and from what user agent the song is being streamed to (ie, ampache web interface, iphone, android, etc.).

Read More...