When you login (type username and password) via console, either sitting at the machine, or remotely via ssh: .bash_profile is executed to configure your shell before the initial command prompt.
If you’ve already logged into your machine and open a new terminal window, then .bashrc is executed before the window command prompt. .bashrc is also run when you start a new bash instance by typing /bin/bash in a terminal.
Most of the time you don’t want to maintain two separate config files for login and non-login shells. You can fix this by sourcing .bashrc from your .bash_profile file, then putting PATH and common settings in .bashrc. To do this, add the following lines to .bash_profile:
if [ -f ~/.bashrc ];
then
source ~/.bashrc
fi
Now when you login to your machine from a console .bashrc will be called.
References
Sunday, February 19, 2012
Saturday, February 18, 2012
SSH Tips
All changes are within file ~/.ssh/config
Multiple Connections
Often it’s useful to have multiple connections to the same server.
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
Repeated Connections
ControlPersist 4h
Passwords
If currently you type a password when making an SSH connection, you can make connecting much more pleasant by setting up SSH keys.
$ ssh-keygen
$ ssh-copy-id username@host.example.org
Hostname Aliases and Usernames
You can also define hostname aliases in SSH config, though this can involve listing each hostname. If your username on a remote server is different from your local username, specify this in your SSH config as well.
Host host1 host2 host3
Multiple Connections
Often it’s useful to have multiple connections to the same server.
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
Repeated Connections
If you find yourself making multiple consecutive connections to the same server then enablepersistent connections.
ControlPersist 4h
Passwords
If currently you type a password when making an SSH connection, you can make connecting much more pleasant by setting up SSH keys.
$ ssh-keygen
$ ssh-copy-id username@host.example.org
Hostname Aliases and Usernames
You can also define hostname aliases in SSH config, though this can involve listing each hostname. If your username on a remote server is different from your local username, specify this in your SSH config as well.
Host host1 host2 host3
HostName %h.example.org
User username
References:
Tuesday, February 14, 2012
Reading Notes for Writing in the Sciences (Ch 04)
IMRAD:
- introduction
- methods and materials: past tense, active or passive voice
- results: past tense
- discussion
- references
- establish topic and significance
- establish need for present research
- introduce the present research
- the major generalization(s) you are making about your data -- such generalizations are often stated in topic sentences at the beginning of paragraphs.
- in pact form, the data supporting the generalization(s)
- refer readers to the visual explicitly
- tell them what patterns to notice
- briefly summarize the major findings
- acknowledge the advantages and limitations of the methods
- explain the implications of the findings
- outline the research questions that remain
- verbs:
- suggest, indicate, show, demonstrate
- adverbs and adverbial phrases:
- possibly, probably, very likely, necessarily, certainly, without doubt, presumably, in all probably, hypothetically, maybe, so far as the evidence suggests, as far as we can determine
- modal auxiliary verb:
- may, might, would, could, should, must, can, shall
- the topic will be introduced in present tense, usually in a sentence or two;
- the background and/or need for the study will be outlined in another few sentences;
- methods and results will be briefly described in past tense; and
- the major conclusions and implications of the study will be stated in present tense.
- Readers typically began by scanning the title and abstract of an article and then looking for the data, focusing on the tables and graphs in which the data are summarized. Only after examining the data themselves did these scientists read the results sectin provided by the authors.
- importance of the research
- originality of the work
- analysis of previous literature
- appropriateness of the approach and experimental design
- adequacy of experimental techniques
- soundness of conclusions and interpretations
- relevance of discussion
- clarity of presentation and organization of the article
- demonstration of reproducibility
- Ann M. Penrose, Steven B. Katz. Writing in the Sciences (3rd edition). Longman. 2009
Sunday, February 12, 2012
Noun Phrase Similarity Rules
Observation:
p53 and TAFII40 and TAFII60
- integer: [-+]?\d+
- rational number: \d+[/]\d+
- finite decimal representation: [-+]?[0-9]*[.][0-9]+([eE][-+]?[0-9]+)?
- suffix hyphen: \w+[-]
- prefix hyphen: [-]\w+
- infix hyphen: \w+[-]\w+
- [A-Z]{2,}
- [A-Z]+\d+
- [a-z]+\d+
- [a-z]+[A-Z]+
- [a-z]+[A-Z]+\d+
- [A-Z]+[a-z]+\d+
- [a-z]+\d+[A-Z]+
- [a-z]+\d+[a-z]+\d+
- [A-Z]+[a-z]+[A-Z]+\d+
- integer: [-+]?\d+
- rational number: \d+[/]\d+
- finite decimal representation: [-+]?[0-9]*[.][0-9]+([eE][-+]?[0-9]+)?
- suffix hyphen: \w+[-]
- prefix hyphen: [-]\w+
- infix hyphen: \w+[-]\w+
- [A-Z]{2,}
- [A-Z][\w \\\/-]*\d
- [a-z][\w \\\/-]*\d
- [a-z0-9]+[A-Z]+
- [a-zA-Z]+\d+[a-zA-Z]+
p53 and TAFII40 and TAFII60
Wednesday, February 8, 2012
Change gedit embedded terminal colors
http://blog.pengyifan.com/change-gedit-embedded-terminal-colors/
Tuesday, February 7, 2012
Varying Sentence Beginnings
1. Non-finite and verbless clause
1.1. gerund-participle
Using histidine - tagged recombinant TR6 , we screened soluble forms of TNF - ligand proteins with immunoprecipitation .
counter example:
Immunoblotting experiments indicate that GRB2 associates with ...
1.2. past-participle
Based on the experiences of all the authors , we emphasized cell cycle inhibitors such as p16 and p21 and regulators of apoptosis such as p53 and members of the bcl - 2 family .
1.3. to-infinitival
To examine whether GRB2 is also a component of ras signaling in mammalian cells , microinjection studies were performed .
2. dependent clause
As previously shown with reticulocyte lysate - reconstituted steroid receptor heteroprotein complexes , the reconstituted pp60 src multiprotein complex contains hsp70
Although both unstimulated and activated human T cells express high affinity IL - 7R , only activated T cells can proliferate to IL - 7 .
3. preposition phrase
In addition , hsp90 in the lysate complexes with wild - type pp60v - src .
From Scatchard analyses , the Kd :s for binding of aFGF and bFGF to hFGFR - 1 were estimated to 25 pM and 41 pM , respectively .
4. adverb
Interestingly , GRB2 exhibits striking structural and functional homology to the C. elegans protein sem - 5 .
5. noun phrase (an object)
The letter , I read it to to you.
1.1. gerund-participle
Using histidine - tagged recombinant TR6 , we screened soluble forms of TNF - ligand proteins with immunoprecipitation .
counter example:
Immunoblotting experiments indicate that GRB2 associates with ...
1.2. past-participle
Based on the experiences of all the authors , we emphasized cell cycle inhibitors such as p16 and p21 and regulators of apoptosis such as p53 and members of the bcl - 2 family .
1.3. to-infinitival
To examine whether GRB2 is also a component of ras signaling in mammalian cells , microinjection studies were performed .
2. dependent clause
As previously shown with reticulocyte lysate - reconstituted steroid receptor heteroprotein complexes , the reconstituted pp60 src multiprotein complex contains hsp70
Although both unstimulated and activated human T cells express high affinity IL - 7R , only activated T cells can proliferate to IL - 7 .
3. preposition phrase
In addition , hsp90 in the lysate complexes with wild - type pp60v - src .
From Scatchard analyses , the Kd :s for binding of aFGF and bFGF to hFGFR - 1 were estimated to 25 pM and 41 pM , respectively .
4. adverb
Interestingly , GRB2 exhibits striking structural and functional homology to the C. elegans protein sem - 5 .
5. noun phrase (an object)
The letter , I read it to to you.
Reference
- Rodney Huddleston, Geoffrey Pullum, etc. The Cambridge Grammar of the English Language. page 51, 604, 1173
- http://intensive-english.blogspot.com/2009/01/25-varying-sentence-beginnings.html
Thursday, December 1, 2011
Subscribe to:
Posts (Atom)