Programming
7 May 2012 1 Comment

Setting Up Git/Github on Ubuntu In Five Minutes

1: Install Git

sudo apt-get install git-core git-doc

2: Configure Git

Bare minimum:

git config --global user.name "Firstname Lastname"
git config --global user.email ""

Enable colors when outputting to terminal:

git config --global color.ui true

These settings are saved in ~/.gitconfig.

3: Generate Cryptographic Keys

Create an RSA public/private key pair in the ~/.ssh/ directory. Be sure to use a passphrase.

ssh-keygen -t rsa -C "" -f ~/.ssh/git_rsa

This generates a private key in ~/.ssh/git_rsa and the corresponding public key in ~/.ssh/git_rsa.pub

4: Add Public Key To Github

Copy all contents of ~/.ssh/git_rsa.pub and add it to your Github profile.

$ cat ~/.ssh/git_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJCqSW4MyOESvnNL6Xjc9jQ3Vvj+yZSqD+HB5Dcbewc3vKpUISaC4mnUetN2B0Xn5QUOVTwdfDti+N+uMHod5VTeDPN7jNdbA/b/Vjo+C+hdJ8tissJDaCSQ29Wluhlogoe/4H3uSWmwKvMkgnK6DK3rXBKdy/T6Xeb8iFlxK5LLUt1B5nv9wxOGlhLd6ul5VeVGZKYxdwRLRkWE1w+ffEnfhJualOOZrW71up2EYl/FnmOMCMA7oKRyje+uQ2XSai220MlMwFH/VSOFskEM9dmilRxtFv27cq1vasiAIloKwFP8uYh42P4m3FPbWMulNXZvA3F4YsDfTBfDzQ3SUt

Linux
7 October 2011 0 Comments

Linux Package Manager Tips

dpkg is the software at the base of the Debian package management system. dpkg is used to install, remove, and provide information about .deb packages.

dpkg itself is a low level tool; higher level tools, such as APT, are used to fetch packages from remote locations or deal with complex package relations. Tools like aptitude or synaptic are more commonly used than dpkg on its own, as they have a more sophisticated way of dealing with package relationships and a friendlier interface.

What package is that file in?

Source: http://www.ubuntugeek.com/what-package-is-that-file-in.html

One question I get all the time is “What package is that file in?” There’s a really easy way to find out yourself. It’s called apt-file and it can search for a file in any package (installed or not). It’s really easy to use:

[sourcecode language="bash"]
$ sudo apt-get install apt-file
$ sudo apt-file update
$ apt-file search autoexpect

expect-dev: usr/share/doc/expect-dev/examples/autoexpect.1.gz
expect-dev: usr/share/doc/expect-dev/examples/autoexpect.gz
expect-tcl8.3: usr/share/doc/expect-tcl8.3/examples/autoexpect
expect-tcl8.3: usr/share/doc/expect-tcl8.3/examples/autoexpect.1…

Tags: aptitude, , synaptics,
Linux
2 October 2011 5 Comments

Fixing Ralink 3090 Wireless Problems on Linux

Introduction

If you have a Ralink 3090 (RT3090) wireless network card, you can run into problems when running Linux. These problems manifest themselves as a connection that is unreliable and slow, or even completely broken.

The Linux kernel decides which modules (drivers) should be loaded for your hardware setup, but it can get it wrong. If you are having lots of wireless networking problems, you probably don’t have the correct modules loaded. The included-by-default kernel module that seems to give the best results with the RT3090 is called rt2860sta. If you are running Ubuntu, you can try the rt3090-dkms package, which might give better results than the rt2860sta module.

List Modules

To see your currently loaded kernel modules:

$ lsmod | less

Using the rt3090-dkms Module

If you are running Ubuntu, this module might give better results than rt2860. In my case Ubuntu would no longer shut down, but there are many positive stories about the module too.

First, install the package from the Markus Heberling’s personal package archive.

$ sudo add-apt-repository ppa:markus-tisoft/rt3090
$ sudo apt-get update
$ sudo apt-get install dkms rt3090-dkms

Now you should …

Linux
3 April 2011 0 Comments

Finding Package Files on Ubuntu After ‘apt-get’ Installation

On Ubuntu, after you use apt-get install you usually have no idea which files were installed and where. To see all files belonging to any package use the dpkg tool:

$ dpkg -L apache2
/.
/usr
/usr/share
/usr/share/doc
/usr/share/bug
/usr/share/bug/apache2
/usr/share/bug/apache2/control
/usr/share/doc/apache2
/usr/share/bug/apache2/script

You can also list all installed packages using dpkg –list:

$ dpkg --list
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                      Version                                 Description
+++-=========================================-=======================================-============================================
ii  acpid                                     1.0.6-9ubuntu8                         

Tags: apt-get, , package files,
Linux
13 March 2011 3 Comments

Ubuntu: Opening Files with the Default Program From a Terminal

Say you want to open a PDF file (myDocument.pdf) through the terminal of the Ubuntu desktop environment. On Windows you would just type the name of file, and Windows finds the program assigned to the PDF extension. On Ubuntu you can type

evince myDocument.pdf

Where evince is the name of the PDF document viewer on Ubuntu. However, it is easier to use the program that Ubuntu’s desktop environment has assigned to the extension:

xdg-open myDocument.pdf

This way you don’t have to find the name of the appropriate binary.…

Tags: evince, , gnome-open,