Need to upload lots of files? RSYNC better than SCP

If you need to upload some files to a remote server, you can use SCP or RSYNC. SCP will upload all of the files. RSYNC compare the files and upload changes only. This is more efficient, especially if there are a lot of files. Here is the basic command:
rsync -av /local/dir server:/remote/dir

Posted in Learning & Innovation, Technology | Leave a comment

Easy to read command line sql responses – use \G

When querying a table from the mysql command line tool, if you have many columns it can be very difficult to read. A simple way to overcome this is to add “\G” to the end of your query. This will save your eyes!

Posted in Uncategorized | Leave a comment

Linux wireless card driver install

Ensure you have gcc build packages:

sudo apt-get install gcc build-essential

Build and install the packages from within the directory with “Makefile”:

sudo make
sudo make install
sudo modprobe 'drivername'

Other Commands

  • ifconfig: Enable your wireless device.
  • iwlist: List the available wireless access points.
  • iwconfig: Configure your wireless connection.
Posted in Uncategorized | Leave a comment

Handy Linux Admin Commands

Permissions Management

  • ls -al – list all contents of a directory along with permissions
  • chmod a+x program.rb – makes script “program.rb” executable (x) by all (a) users
  • chown user:group filename – changes the owner and group of “filename”
  • chgrp -R users home/ – assigns directory “home/” and contents to group “users”
  • cat /etc/passwd – shows all users on a system
  • cat /etc/group – shows all groups on a system

Disk space

  • du -h – lists all child file names/sizes (careful, this can list every file on your computer if you execute while in “/”)
  • df -h – prints used/available disk space on drives
Posted in Uncategorized | Leave a comment

Setup a Minecraft Multiplayer Server on the Rackspace Cloud with Ubuntu

Using a Rackspace Cloud server is a cheap, easy and fast way to setup a Minecraft multiplayer experience. The server size I use only costs $.03 an hour which works out to around $20 a month. This mini setup guide will take you about 10 minutes to an hour depending on how comfortable you are with the command line.

Pre-requisites

  • Setup a Rackspace Cloud Account if you don’t already have one. You should have Cloud Servers enabled.
  • An SSH client. On windows, use Putty. For Linux or Mac OSX, use the command line tool called ‘ssh’. On Ubuntu/Debian, you can easily type ‘sudo apt-get install ssh’.

Create your cloud server

This is the standard method for creating a basic Rackspace Cloud server.

  • Login to the Control Panel
  • Click Hosting > Cloud servers
  • Click ‘Add Server’ then click ‘select’ next to ‘Ubuntu 11.04 (Natty Narwhal)’
  • On the next page (Server Configuration) set the server name to ‘minecraft’ and your server size to at least 512MB/40GB.
  • Click ‘Create Server’
  • Copy the root password and store it some place safe. Close the window that popped up.
  • You are now on the server details page. Under the sub-heading ‘Technical Details’, copy the IP address.

Server setup basics

You will need to install some software before you can begin. On windows, use Putty to create a new connection to your server, entering username, password and IP. If you are using linux/Mac, enter the following into a command prompt, followed by your password when prompted:

ssh root@[yourServerIP]

Install Sun Java

This line will allow us to use command line tools to update the source repositories. If you are not root, you will need to add ‘sudo’ to the beginning of each command.

apt-get install --reinstall python-software-properties
dpkg-reconfigure python-software-properties

Add the repository that contains our sun java package.

add-apt-repository "deb http://archive.canonical.com/ lucid partner"
apt-get update

Begin the java installation. Accept all the defaults by pressing [enter]. You need to also accept Oracle/Sun’s license agreements, it will be a blue/white screen.

apt-get install sun-java6-jre

Test to ensure a successful installation:

java -version

The response to this command should be similar to the following:

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

Install Screen

Screen is a tool that allows you to keep your Minecraft multiplayer server running without having to stay logged into the server.

apt-get install screen

Setup Your Minecraft user

For security purposes, you should setup a different user that will actually run the Minecraft server. Type the following. When prompted, enter your password and accept all other defaults by pressing [enter].

adduser minecraft

Finally, log out of your root account:

exit

Setup the Minecraft server

Login as the [minecraft] user you created in the prior step.

SSH into your server using the Minecraft user you created in the previous step. With Windows Putty, simply create a new connection and insert your username/password/IP. In linux/MacOSX, type the following from a command prompt:

ssh minecraft@[yourIPAddress]

Download and Unpack Minecraft

Download the minecraft server using the linux tool ‘wget’.

wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar

Run the server with screen

screen -dmS minecraft java -Xms256M -Xmx512M -jar minecraft_server.jar nogui

If you get no errors, than your server is now starting up. It should take about 15 to 30 seconds to finish generating worlds and finish starting-up. To check on it, use screen to see how it is progressing:

screen -r minecraft

If you see the following, your server is now ready to use:

'2011-11-25 17:49:46 [INFO] Done (9753734653ns)! For help, type "help" or "?"

Since the server is now running, detach from your screen session by pressing [control]-[a]. Type the letter [d] and hit [enter].

Now, open minecraft on your home computer and craete a new multiplayer server. Use the IP address of your server. Enjoy! Remember, the Minecraft multiplayer version must match the Minecraft client installed on your home computer.

Posted in Uncategorized | 3 Comments

Add user w/ sudo on Ubuntu

adduser [newusername] sudo

Posted in Uncategorized | Tagged | Leave a comment

Salesforce Chatter API integration notes and tools

Here is a good video primer on the API. More documentation in PDF.

Posted in Uncategorized | Tagged | Leave a comment

Salesforce dataloader for Macs – LexiLoader

LexiLoader

Posted in Uncategorized | Leave a comment

Git cheat sheet

http://help.github.com/git-cheat-sheets/

Some of my favorite commands

  • git diff 26b8be988f885efe617fc39ebd5024d062c2ad4c --stat – shows what files have changed between current revision and previous commit
  • more to come…
Posted in Uncategorized | Leave a comment

Movies for Geek Kids

Like any good parent, I want to ensure my child receives the best education and up-bringing that reflects my values. What better way then to expose them to a bunch of movies!!!

What makes a geek movie?

To provide me with some guidelines for selection, I have defined criteria for this list. The movie must be significant in one of the following ways:

  1. Visual effects
  2. Technology & humanity – provide social, cultural, or philosophical commentary on the subject. Comedy is acceptable.
  3. Geek storyline – tell a story that resonates with geeks (geek kid is outkast, learns technology, saves world, gets girl)

Pre-teens

Here is a list that will get my daughter started with a proper geek cultural education.

  • Tron
  • Goonies
  • The Never Ending Story
  • Chitty Chitty Bang Bang
  • Willy Wonka and the Chocolate Factory
  • Star Wars series
  • The Last Starfighter
  • Time Bandits
  • The Dark Crystal
  • War Games
  • Back to the Future
  • Short Circuit
  • Star Trek
  • Space Balls
  • Indiana Jones & the Raiders of the Lost Ark
  • Indiana Jones & the Temple of Doom
  • The Lord of the Rings (1978 animated)
  • Superman
  • The Fifth Element
  • Real Genius
  • D.A.R.Y.L.
  • Bill & Teds Excellent Adventure
  • Flight of the Navigator
  • Labyrinth
  • Iron Giant
  • The Incredibles
  • Justice League: The New Frontier
  • Willow
  • City of Ember

Teens

When she gets older, we will start on these.

  • Terminator
  • Monty Python and the Holy Grail
  • Metropolis
  • Brazil
  • Alien
  • Bladerunner
  • Planet of the Apes
  • The Matrix
  • Lord of the Rings Series
  • Akira
  • Pi
  • Sneakers
  • Weird Science
  • 12 Monkeys
  • Hackers
  • Fahrenheit 451
  • Rocky Horror Picture Show

Sources

Posted in Uncategorized | 4 Comments