Showing posts with label unix. Show all posts
Showing posts with label unix. Show all posts

Friday, May 10, 2013

Install firefox 20 addons offline (via the command line)

So much misinformation out there, that it took a while to figure this out.  And seeing that the documentation for mozilla firefox is an out-of-date mess, this will probably be out of date in a few versions as well.

Currently the only way I've gotten an add-on to install automatically is as follows:

  1. Download the add-on.  You can simply go to the page for the add-on at https://addons.mozilla.org/en-US/firefox/ and right click on the 'Add to Firefox' button and select 'Save Link As...'
  2. Get the application id of the add-on and rename the .xpi file you downloaded to .xpi.  Typically the id is a uuid like {D4DD63FA-01E4-46a7-B6B1-EDAB7D6AD389}, but sometimes it's a string such as an email address or webaddress.  NOTE that if you have an id of {ec8030f7-c20a-464f-9b0e-13a3a9e97384}, you have the WRONG id.  That is the id for the firefox application itself (this value might change with different versions of firefox).
  3. Move the renamed xpi file to either your local mozilla profile directory at  ~/.mozilla/firefox/-profile_id-/extensions/ or to the global directory at /usr/lib/firefox-addons/extensions/. The -profile_id- can be found in ~/.mozilla/firefox/profiles.ini.  You'll have to find the correct Profile section and then the 'Path' for that profile (usually there's just one profile section, Profile0 with 'Name' = default).
  4. Restart firefox. You'll be prompted to install the add-ons you've added to the extensions directory once firefox starts up.
The same can be done for themes.

Tuesday, August 24, 2010

Adding backgrounds to directories in LS_COLORS

To add backgrounds to the directories in the output of ls, in .bashrc add:

export LS_COLORS='di=01;34;47'

Monday, November 30, 2009

github, ssh config file and ssh-agent

Github makes use of ssh-keys for checking out your stuff via git. I also have several different keys and store them with different names such as github_rsa or some such. In order to get this to work, you have to create a config file that stores the location of the private key.

For github, in the .ssh/ directory, create a file `config` and enter in the following:
From github's help page:

Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile path-to-private-key


In several situations I've had to set up ssh keys for remote machines that only provide me with terminal access. Thus I keep getting pestered to enter the passphrase for the ssh key. ssh-agent takes care of having to keep entering in the passphrase.

After setting up the ssh-keys do:
eval `ssh-agent`; ssh-add ~/.ssh/github_rsa

It will then ask for the passphrase the one time when it adds the key to the agent, and then wont ask again.

The 'let go' command

I was recently let go from the place where I plied my craft (I left on ok terms). The only real issue I had was that the computer I used there was a company computer, and during the time I had spent there, I had done things such as purchase stuff on amazon.com, save passwords to various email accounts in browsers, etc. So to rectify this situation and ensure that nobody using the computer after me had access to my data, I rebooted the machine in recovery mode (this was an ubuntu box) and ran

find /home/tfdml/. -type f | xargs shred -fu ; rm -rf /home/tfdml/ ; shutdown -h now

then gathered my belonging's and left. Note that I could have just as easily switched to an alternate terminal with ctrl-alt-f1 and ran the command there.

This ensured, at least to my level of paranoia, that all my personal information was secure. Now, all documentation, code and notes were all stored in the company repo, so it's not like I was being malicious and destroying all the work I had done for the company. This removed all of my own personal information from the machine without having to reformat the drive or any other such drastic measures and allowed for the company to quickly turn the machine around for another worker to use.

(Edit: It turns out this command didnt work as well as I planned as apparently it took quite some time to run. Eventually one of the other dev's there saw the machine was on and simply turned it off since there was nobody using it anymore. This allowed the guy who got the computer after me access to some of the files in my account. In retrospect, I should delete all the huge files (anything over a gig, music directory, vm images) before running this command and ensuring that the command is only going to operate on a set of files that amount to at most a gig.)