Mac OSX prompt git branch aware
How can I display the current branch and folder path in terminal?
bi-directional sync with rsync I am trying to setup bi-direction or two way sync with rsync. In my case I only need to delete the files when syncing from B to A. So, I was thinking of running rsync twice as follow :  rsync -rtuv ./A/ ./B/ rsync -rtuv --delete ./B/ ./A/   This problem with this solution is that when I run rsync (B->A) which would be right after running the rsync (A-B), Any new file that get created in between the sync will also get removed.  Is there a way I can specify a time stamp as condition that it only delete the file if it created before this date/time.  Updated:  I understand there is a unison solution but the problem with unison is required to install on both ends. I am syncing with a remote server and I can not install unison on the remote end. Old Budrys(?) end-of-world/alien invasion of NYC story This one, from the late 1950s or early 60s (I think), features the last girl in NYC, who drives her jeep up the stairs of the main library (with the lions). She feels bad about breaking the lock, but what's a girl to do, if she wants something to read? In summertime, she drives topless and, the author writes, her bosom dances enchantingly on the steps. She lives in the boathouse on the lake in Central Park. Mysterious insect-like aliens are eating the buildings in the City.... I didn't recognize a title in Budrys or Bester's isfdb bibliogs, so I may be wrong about the author. But not about the story details: it's a memorable one. Thanks in advance for helping ID this one! Baby Rudin Theorem 1.20 (b) Proof I have a question about Rudin's proof of Theorem 1.20 (b) in his book Principles of Mathematical Analysis.  Theorem 1.20 is stated as follows:     (a) If $x\in R, y\in R$, and $x&gt;0$, then there is a positive integer $n$ such that $$nx&gt;y.$$   (b) If $x\in R, y\in R$, and $x&lt;y$, then there exists a $p\in Q$ such that $x&lt;p&lt;y$.     I understand Rudin's proof of (a).  The beginning of Rudin's proof of (b) is given below:     Since $x&lt;y$, we have $y-x&gt;0$, and (a) furnishes a positive integer $n$ such that $$n(y-x)&gt;1.$$  Apply (a) again, to obtain positive integers $m_1$ and $m_2$ such that $m_1&gt;nx$, $m_2&gt;-nx$.  Then $$-m_2&lt;nx&lt;m_1.$$  Hence there is an integer $m$ (with $-m_2\leq m\leq m_1$) such that $$m-1\leq nx&lt;m.$$   I don't understand the justification for this last sentence beginning "Hence...."  How is $m$ found, and why are $m_1$ and $m_2$ needed to find $m$? How to make dot match newline characters using regular expressions Non in front of hyphenated adjective If one wishes to add "non" in front of a hyphenated adjective, should one add a hyphen after "non?" Open-source alternative to Adobe InDesign There is some open-source software, similar to Adobe InDesign? It would be awesome if it do exist...  I know all the others like Inkscape, Gimp, etc... but for InDesign i have none.  Could you give me one direction? A map is continuous if and only if for every set, the image of closure is contained in the closure of image Putnam and Beyond AM-GM help Is $\frac{1}{\sqrt{2}}$ a fraction or not?   I just came across a Grade 8 student's class work where the teacher has given the above as an example to differentiate fractions from rational numbers. I think this is wrong fundamentally, as $\sqrt2$ is irrational while all fractions would be rational. Please advise. Thanks! When I do upgrade it gets stuck here:  user@plato:~# sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages will be upgraded:   bind9-host coreutils cpio curl dnsutils libbind9-90 libc-bin libc-dev-bin   libc6 libc6-dev libcgmanager0 libcurl3 libcurl3-gnutls libdns100   libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libisc95 libisccc90   libisccfg90 libjasper1 liblwres90 libplymouth2 libsepol1 libssl-dev   libssl-doc libssl1.0.0 linux-libc-dev mime-support multiarch-support ntp   ntpdate openssl plymouth plymouth-theme-ubuntu-text python3-distupgrade   ubuntu-release-upgrader-core unzip 39 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 16.0 MB of archives. After this operation, 12.3 kB of additional disk space will be used. Do you want to continue? [Y/n] y 0% [Connecting to us.archive.ubuntu.com (2001:67c:1562::15)] ░   When I do update it gets stuck here:  user@plato:~# apt-get update 0% [Connecting to us.archive.ubuntu.com (2001:67c:1562::14)] [Connecting to sec░   I'm able to ping us.archive.ubuntu.com just fine:  user@plato:~# ping us.archive.ubuntu.com PING us.archive.ubuntu.com (91.189.91.23) 56(84) bytes of data. 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=1 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=2 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=3 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=4 ttl=54 time=81.4 ms ^C --- us.archive.ubuntu.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 81.425/81.528/81.582/0.355 ms   What can i do to fix this?    What I have tried so far.  I've tried following directions on this blog:   To force apt-get to use IPv4 exclusively   Create a file in /etc/apt/apt.conf.d/99force-ipv4 Add this line to newly created file Acquire::ForceIPv4 false; Apt-get will now use IPv4 exclusively Autorun.inf in Windows 8/8.1 for USB Drives I have created a file named autorun.inf to make one of my software setup run when the usb is plugged into Windows 8/8.1 OS .  This is my autorun.inf code:   [AutoRun] shellexecute="Mem.exe //It would be nice if i could add path to this like my Doc//mem.exe UseAutoPlay=1   Is there any software that let's us to create auto-run files for USB Sticks?  Is there any way to add new options in right click menu only on my USB window? Proving $f' = - \frac{\partial{F}/\partial{x}}{\partial{F}/\partial{y}}$ I am trying to prove that, if $f:\mathbb{R}\rightarrow \mathbb{R}$ and $F:\mathbb{R}^2\rightarrow\mathbb{R}$ are differentiable, $F$ satisfying $F(x,f(x))=0$ and $\partial{F}/\partial{y}\ne 0$ then $$f'(x)=-\frac{\partial{F}/\partial{x}}{\partial{F}/\partial{y}}$$  This appears in a section on the chain rule for many-variables functions, but without knowing the details of $F$ I find it very hard to prove much about it.  To the best of my ability to reason about it, I suppose I could say  $$ \frac{\partial{F}}{\partial{x}}=\frac{\partial{F}}{\partial{x}}\frac{\partial{x}}{\partial{x}} + \frac{\partial{F}}{\partial{y}}\frac{\partial{y}}{\partial{x}}$$  but for more than one reason I doubt that what I have written is correct.  Yet I'm not exactly sure what's wrong about it, nor can I guess what else I could do.  I tried finding the partial with respect to $y$ but got nothing more useful looking than this.  I also tried writing out limit definitions and saw no useful path forward through that. I am trying to prove that all vector spaces can be written as the direct sum of two subspaces.  My attempt: If each vector in vector space V can be uniquely written as the sum of two other vectors in V, the two vectors can be categorized into subspaces and thus V can be written as the direct sum of these subspaces. I am not sure how to show that this is true for all cases though. Edit Sorry for the confusion,to clarify I meantGiven a vector space V with a subspace W, prove that there exists a subspace W' such that the direct sum of W and W' is V.I am not sure about my proof method at all. Thank you. I'm working on an app that requires no user input, but I don't want the iPhone to enter the power saving mode.  Is it possible to disable power saving from an app? CHECK constraint in MySQL is not working Stern-Brocot tree where each node has two fathers Why do people buy stocks that pay no dividend? Should I put a comma before the last item in a list? Should I put a comma before the last item in a list?     I would like crackers, cheese and some soda.   I would like crackers, cheese, and some soda. There is this famous example about the order difference between gravitational force and EM force. All the gravitational force of Earth is just countered by the electromagnetic force between the electrons on the surface of my feet and the ground.  But also wave-function of electrons(fermions) do not overlap each other due to Pauli exclusion principle.  So which one is the true reason of me not flopping inside the earth forever? Is it only one of them(my guess is Pauli exclusion) or is it both? How many arguments does a function require, and how to use that in `Manipulate`