Something that I’ve missed when I switch from SVN to git was subeclipse:(
I’m using eGit, but it lacks support for doing a simple task like reverting modifications from a specific file.
Even though I’m getting use to those simple command line scripts a simple thing like reverting modifications from a specific file is kind of tedious, and this is something that I could handle in the IDE.
To simplify this procedure I’ve created a simple bash script (revert.sh):
# @author Daniel Botelho <firstname.lastname@example.org>
# @date 2010-05-19
#echo $git status
If you need to run alot of scripts in your console you’ll find that it’s terrible to wait for those scripts to finish.
I’ve found the “beep” application that allows you to send a sound signal when you run “beep” in the console. With this application I no longer need to stare at the console waiting for that script to finish, because when the script finishes you’ll receive a system beep sound.
So lets say I want to run the script “backup.sh” and receive a beep signal when the script finishes:
$ ./backup.sh ; beep
To install the beep application in ubuntu just run this command in the console:
Actually is not Multithreading, but the ability to run scripts in parallel and synchronization also
In Linux systems each process has an associated “process identification number” (PID) that you can monitor using the “ps” application. If you want to run a process in background you just need to append the caracter “&” to the command and it will free the console for you.
So basically the script below, executes commands, gathering all PIDs and in the end it waits for them to finish:
RET=”$(echo $STRING | sed ‘s/^[^0-9]*//’ | sed ‘s/[^0-9].*$//’)”
I’m working in a project that uses a lot of symfony tasks to migrate an ancient database to a new one.
Due to some PHP garbage collection issues, we had to do some tricks so the script would run completely . This was done, using a bash script that was responsible to call symfony tasks one at a time, avoiding memory leaking from PHP.
for TASK in “$@”
Here I’ve put the project path location (variable “path”), the php location (variable “php”) and the symfony script location path (variable symfony). I’ve also created an function that is responsible to run a symfony task called “runtask()”.
Now If I wanted to run the symfony task’s “migratePhotos” and “migrateComments” I would create an script like this:
This was something that have been bothering me for a long time, since I’ve some unread messages but I didn’t knew how to find them.
Finally I’ve decided to google “gmail feature request”, and the 5th hit says “Gmail feature request – show unread messages first”
So, basically you put “label:unread” in the search box and you get all the unread messages