Main menu:


Site search

My Wife’s Website

Recent Posts

Categories

Archives

March 2017
S M T W T F S
« Feb    
 1234
567891011
12131415161718
19202122232425
262728293031  

Links:

Meta

Git: Bash Prompt

I like seeing some git info on my bash prompt. I have changed mine to be:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w$(__git_ps1)\[\033[00m\]\n\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(__git_ps1)\n\$ '
fi

Update: Here is the command-line to update the .bashrc file:

sed -i.bak '/\\e\]/! s@\\w@\\w$(__git_ps1)@g; s@\\\$@\\n\\\$@g' .bashrc

Git: Cloning from a local reference

Git has a lot of power (and therefore many ways to shoot your foot).  Some of these are harder to remember.  So I am going to blog of few of these to remember the more interesting ones.

Often, I will want to try something out, but I really want to start from scratch in a new directory.  I want to clone the repo, but it would be more efficient to clone a local reference to clone from instead of going over network to the “main” repo.

git clone –reference project/.git -b branch git://github.com/user/project project_alt_name

Dynamic or Static Typed Language?

When starting on a new project, I often wonder if I should try that new language to see what I am missing out on.  I have wondered if I should try to use web-based tools for a mobile app or Java/Ruby/Python for a web-based app.

Here is a good article that may help with the decision.

Type-System Criteria

In summary…

Criteria · Let’s call them the Bánffy-Bray criteria for selecting between static and dynamic type systems.

  1. Static typing’s attractiveness is a direct function (and dynamic typing’s an inverse function) of API surface size.
  2. Dynamic typing’s attractiveness is a direct function (and static typing’s an inverse function) of unit testing workability.

Moving Windows Between Monitors on Linux

I like to do things with the keyboard when possible.  I would rather not have to move my hand over to the mouse.  In Windows 7, I had gotten used to using some new keyboard shortcuts.  I also like having multiple monitors (three monitors is the best!).  I got use to hitting WIN-SHIFT-LEFT ARROW (or RIGHT ARROW) to move a window between monitors.

With my new work position, I have recent changed to using Linux.  There are some keyboard shortcuts for some things, but not for moving windows between multiple monitors!  However, I created this bash script using xdotool and then used keyboard shortcuts to execute the script!

PowerPoint pptPlex

a couple of years ago, I saw someone give a presentation where they were able to use a zoom in and out of the slides in such away were related slides were clustered together and it made it easier to skip around your slides. I found out that this was done using the PowerPoint addon called pptPlex.  Here is the description from there website:

pptPlex uses Plex technology to give you the power to zoom in and out of slide sections and move directly between slides that are not sequential in your presentation. Watch the videos below to see how pptPlex can help you organize and present information in a non-linear fashion. Test drive pptPlex and wow your audience with your next presentation.

The page has some videos about the addon and how to set it up.