Tuesday, August 6, 2013

Solo quería compartir una frase que me pareció interesante

"Always forgive the one that go to far, never forgive the boring ones" -Marco Grob- fotógrafo exclusivo de retratos


Maine Media Workshops Interview with Marco Grob from Maine Media Workshops + College on Vimeo.

Friday, June 7, 2013

Creating Components and libraries in Kicad

Refer to this tutorial, where it is well documented:

compressing file from the command line and adding the date of creation to it


You need to use tar command as follows (syntax of tar command):
tar -zcvf LC52_`date +%b%d-%y`.tag.gz data/


Where,
  • -z: Compress archive using gzip program
  • -c: Create archive
  • -v: Verbose i.e display progress while creating archive
  • -f: Archive File name
  • -x: Extract files
source: link for compresing and link for date on file 1, 2

Cygwin custom prompt


The next information is taken from (http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html) it is not mine. trying to fix my prompt in a new machine that doesn't show up anything, not even the folder where it is i found this:
Prompt is control via a special shell variable. You need to set PS1, PS2, PS3 and PS4 variable. If set, the value is executed as a command prior to issuing each primary prompt.
  • PS1 - The value of this parameter is expanded (see PROMPTING below) and used as the primary prompt string. The default value is \s-\v\$ .
  • PS2 - The value of this parameter is expanded as with PS1 and used as the secondary prompt string. The default is >
  • PS3 - The value of this parameter is used as the prompt for the select command
  • PS4 - The value of this parameter is expanded as with PS1 and the value is printed before each command bash displays during an execution trace. The first character of PS4 is replicated multiple times, as necessary, to indicate multiple levels of indirection. The default is +

How do I display current prompt setting?

Simply use echo command, enter:
$ echo $PS1Output:
\\u@\h \\W]\\$

How do I modify or change the prompt?

Modifying the prompt is easy task. Just assign a new value to PS1 and hit enter key:
My old prompt --> [vivek@105r2 ~]$
PS1="touch me : "
Output: My new prompt
touch me : 
So when executing interactively, bash displays the primary prompt PS1 when it is ready to read a command, and the secondary prompt PS2 when it needs more input to complete a command. Bash allows these prompt strings to be customized by inserting a number of backslash-escaped special characters that are decoded as follows:
  • \a : an ASCII bell character (07)
  • \d : the date in "Weekday Month Date" format (e.g., "Tue May 26")
  • \D{format} : the format is passed to strftime(3) and the result is inserted into the prompt string; an empty format results in a locale-specific time representation. The braces are required
  • \e : an ASCII escape character (033)
  • \h : the hostname up to the first '.'
  • \H : the hostname
  • \j : the number of jobs currently managed by the shell
  • \l : the basename of the shell’s terminal device name
  • \n : newline
  • \r : carriage return
  • \s : the name of the shell, the basename of $0 (the portion following the final slash)
  • \t : the current time in 24-hour HH:MM:SS format
  • \T : the current time in 12-hour HH:MM:SS format
  • \@ : the current time in 12-hour am/pm format
  • \A : the current time in 24-hour HH:MM format
  • \u : the username of the current user
  • \v : the version of bash (e.g., 2.00)
  • \V : the release of bash, version + patch level (e.g., 2.00.0)
  • \w : the current working directory, with $HOME abbreviated with a tilde
  • \W : the basename of the current working directory, with $HOME abbreviated with a tilde
  • \! : the history number of this command
  • \# : the command number of this command
  • \$ : if the effective UID is 0, a #, otherwise a $
  • \nnn : the character corresponding to the octal number nnn
  • \\ : a backslash
  • \[ : begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt
  • \] : end a sequence of non-printing characters
the SP1 value is stored in /etc/bash.bashrc at first i didn't have that file so i just copy the one in my other machine and it worked perfect. here is the file:


# To the extent possible under law, the author(s) have dedicated all 
# copyright and related and neighboring rights to this software to the 
# public domain worldwide. This software is distributed without any warranty. 
# You should have received a copy of the CC0 Public Domain Dedication along 
# with this software. 
# If not, see

# base-files version 4.1-1

# /etc/bash.bashrc: executed by bash(1) for interactive shells.

# The latest version as installed by the Cygwin Setup program can
# always be found at /etc/defaults/etc/bash.bashrc

# Modifying /etc/bash.bashrc directly will prevent
# setup from updating it.

# System-wide bashrc file

# Check that we haven't already been sourced.
([[ -z ${CYG_SYS_BASHRC} ]] && CYG_SYS_BASHRC="1") || return

# If not running interactively, don't do anything
[[ "$-" != *i* ]] && return

# Set a default prompt of: user@host and current_directory
PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '

# Uncomment to use the terminal colours set in DIR_COLORS
# eval "$(dircolors -b /etc/DIR_COLORS)"

Friday, May 31, 2013

Enabling DISPLAY environment variable for X11 forwarding from cygwin


I want to do this so I can forward commands to gnuplot from a shell script i have on cygwin, the steps where taken from the web[1,2].

Make sure you have the x11 packages installed in your cygwin and go to step 3, if not start from 1
  1. Run the Cygwin installer (You can obtain cygwin from here: http://www.cygwin.com/setup.exe
  2. At the package list, select to install all packages that are under the X11 category. Click next, accept all the dependencies, and install.
  3. In the  Cygwin shell, run startxwin  
  4. In your Cygwin shell, run export DISPLAY=:0.0.
You'll need to repeat step 3 every time you reboot your computer, and step 4 every time you open a new Cygwin shell (or just run echo "export DISPLAY=:0.0" >>~/.bash_profile to have it run automatically whenever you create a new shell).

Ref: 1, 2

Thursday, October 11, 2012

Finally Approved to work in the Molecular Foundry


Even though i had all the required training i was told only to work under the supervision of somebody while preparing my samples for the LC/MS, and i wasn't authorized to run the machine at all. Today i got the LC/MS training, that was pretty much like do what you already know, and sign this piece of paper. Just like that now i can just walk in to the machine and magically load my sample...ehhh.

This is the look of the Molecular Foundry in the back side of the Berkeley Lab.

 The hall of fame of all the authorized users, my picture is from April 13, but i just got really authorized.
 and this is a zoom in of my pic in the lower part of the hall of fame.

Tuesday, August 28, 2012

Looking for Graduate programs

This is what happen when you have over 50 internet web pages open looking for graduate programs to apply to, it is quite surprising that my computer died under this very low conditions but it must be a windows issue, again, i'm going to install Ubuntu as my regular OS and let Windows only for video games and final versions of my documents in Word. Last time I spent so many time trying to have the GPU working on Ubuntu but i couldn't, that was the reason to install Windows, because the initial idea was to have an only Ubuntu machine, now back to the hybrid.