Remove duplicate jars
Quick Ref: Linux Mint 11 #1
Quick Ref: SVN command line
Git with Dropbox
Quick Start: Git for personal use
Quick script to maintain a diary
Bicycle Diaries - I
Simple MongoDB+Java example
Cisco's new urbanism
Labelling in Outlook 2003 ala Gmail
Blogroll: Other sites I read.
Categories: with XML
Monthly
| June 2012 | ||||||
|---|---|---|---|---|---|---|
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
Disclaimer: These are my personal views, opinions and experiences. These do not reflect the views or experiences of any of my employers or clients.
Often you will find that you’ve multiple versions of the same dependency jars in your WEB-INF/lib or your classpath directories when you are merging multiple modules. This small shell script can be run on those directories to get rid of older versions of the same jar.
#!/bin/bash #in a directory full of jar files, it is common to have multiple #versions of the same jars. If versions are named with only periods #and alphanumerics, then this groups the jars by the name, deletes #all the lesser versions #get a list of jars like x-1.0.0.RELEASE.jar, get only the jar name #without version or .jar and get only non unique lines (ie., duplicate #jars are found) for PREFIX in `ls *.jar|sed ’s/-[0-9\.a-zA-Z]*\.jar//g'|uniq -d`; do echo $PREFIX #now do a reverse sorted listing with the jar name and remove the #top line so that non latest versions are returned for FILE in `ls -r ${PREFIX}*|sed '1d'`; do echo " $FILE" rm -f $FILE done done
To force a filesystem check on root filesystem on next reboot, do:
sudo touch /forcefsck
To restore the gnome panel to defaults:
gconftool-2 --shutdown rm -rf ~/.gconf/apps/panel pkill gnome-panel
If clicking on any file location from say google chrome download list or other links gives an error the requested location is not a folder:
sudo apt-get remove exo-utils
#make a working dir mkdir sandbox cd sandbox #checkout svn co svn://svn-repo-machine/repo/path myproject --username myusernameatsvnserver #go to work on items cd myproject #pull latest from server svn up #queue a file for addition svn add newfile.c #queue for deletion svn delete anoldfilewedontneed.c #get the info on what is different in your local vs server svn status #list commit comments on a file svn log AFILESOMEONECHANGED.c #commit one file. * will commit all that changed. svn ci -m "Edited this file for ..." filethatgotchanged.c
Now, configure vim as the svn diff tool.
First, check out Git for personal use. Extending those principles to Dropbox is fairly easy.
cd ~/Dropbox mkdir -p gitroot/research.git && cd !$ git --bare init cd ~/Projects git init git remote add dropbox file://$HOME/Dropbox/gitroot/research.git git add testfile.txt git commit -m "initial" git push dropbox master ssh anothercomputer cd ~/Projects git clone -o dropbox file://$HOME/Dropbox/gitroot/research.git cd research ls >> testfile.txt git commit -m "just testing" git push dropbox master git pull dropbox master
For the first computer, once you fill the bare repo with some stuff, you can delete the folder and do a clone like how you did with the second computer.
Problem: Needed to find a way to keep my config and research files under version control which I can get to various machines I work with and update from anywhere.
Tried Mercurial, Darcs, Bazaar and Git. Fossil is also a great tool that provides wiki, version control and ticket management. Darcs is the easiest, but for some reason, extremely slow. Finally chose Git. Download and compile was easy. Read top 3 lines in the INSTALL file in source distribution for steps. Rest of the steps explain how I set it up. Note that this may not be the best possible Git workflow. Merely that it works for me. Note that I’ve installed git in ~/software/git.
More »I like to keep my daily notes in a folder in the filesystem with filenames yyyymmdd.otl, using VIM Outliner. Here is a small DOS script to make a file for a day if it doesn’t exist and then open it. Name it as diary.cmd and keep in your path.
More »