General IT Notes
General Problem-Solving Algorithm
- Look for a past solution that can be re-applied or modified. First look at solutions that I have already used. If there is not a simple or elegant solution, do independent research (books, mailing lists, StackExchange) to see if others have devised a solution in the past that can be applied.
- If step 1 fails, create some preliminary specifications for a solution.
- Look for tools to implement the specifications.
- Write pseudocode or make a flow chart to keep track of how components (functions, applications) might interact.
- Document as you go along.
- If the project is going to be long-term, set up a time table.
Lessons learned from working with non-standalone PsychoPy
- Next time use a VM if you need to install deprecated or bleeding edge libraries on a system (i.e., 32-bit Python).
- Code reuse.
User-friendly Subversion clients
- Mac - svnX, SCPlugin
- Windows - TortoiseSVN
Technology to become acquainted with
- ACL permissions
scp -r dir1 user@server:dir2 If dir2 does not exist, creates dir2 on server, populates with items within dir1. Bref: files nested w/in dir2 Else: If dir2 exists, copies dir1 into dir2 and nests it within dir2. Bref dir1 nested w/in dir2.
- If you remove 'execute' from a directory, you will not be able to cd into it.
- octal codes for umask are the inverse of chmod codes
- -F : returns lines with single occurrence of literal string (fgrep)
- -x : returns only if the entire line is an exact match for literal string
- -E : use extended regex (Perl style); no need for escapes to denote atoms (? review this) (egrep)
- returns lines with any number of consecutive repeats of search string
- . - wildcard character
. or SOURCE :
Runs a script's commands through the current shell line by line. The script's variables become available to the current shell environment.
To list all directories (and only directories) within a directory use: ls -d */ NOT ls -d
Zero Padding in Bash:
printf "%0*d\n" $padtowidth $i