I find myself keep needing this, so I'm posting it for my future reference and perhaps yours.
The short of it:
mklink /J [target-folder] [source-folder]
mklink /J C:\Users\Matthew\Desktop\Dropbox C:\Users\Matthew\Documents\Dropbox
While working on a new pet project I ran into an annoying problem with Foundation Zurb 5's top bar dropdown. I couldn't find any solution on the web so I thought I'd share a workaround.
The top bar dropdown is shown and hidden using CSS in a way that prevents the click event propogation. If you want your menu items to do something other than an href, like listening to a click and doing something programmatically, you're out of luck - the event won't fire.
Here's a JSBin with the problem demonstrated:I've added click listeners on the menu items that should open an alert window when clicked. Try clicking on dropdown->link, nothing will happen. This is because the element is hidden before the event can trigger.
I wanted to keep Foundation's hiding CSS because in the comments it is said to support accessibility. I assume there is some learned knowledge sunk into it so I prefer not to touch it directly, but manipulate around it with code.
Therefore I won't call it a solution because it's not elegant enough, but it works and should get you out of the bind if you're in it. I'm using the scss version so I'll describe what I did there. At the bottom of the post I've linked a JSBin with the solution in plain CSS.
Open _top-bar.scss, and find the following snippet:
The @include represents the following CSS:
(plus a display:block)
Move the @include into a new class (give it whatever name you see fit)
Now, in your HTML, add the class to the dropdown. I am using Ember so the following is a Handlebars template:
The unelegant part is that you need to control the dropdown visibility from code. It shouldn't be super dirty; if you listen to clicks on the dropdown and toggle the hiding class it should do most of the trick.
Here's a JSBin with the solution with plain CSS
If you have a nice CSS only solution for this please share in the comments.
The purpose of the technical overview is to present approaches for tackling and solving challenges from start to finish. I am aiming this series for intermediate level developers. This means that I expect the readers to be fairly familiar with programming and some web technologies (i.e. not complete beginners), and I will spend very little time delving into implementation details, so very experienced developers may be familiar with most of the content.
Despite being a blasphemous Windows user, I still love using the git bash. It's way quicker than GUI for many operations, and it allows me to immediately check which branch I'm on. Combined with the knowledge of a few keyboard shortcuts, I can also perform quick operations on multiple repositories in sequence by having several bash instances open. This flexibility is simply unrivaled by GUI.
There are some operations, though, where the power of GUI really shines through. When committing changes, for example, I like to go over every file I changed and go over the changes quickly to make sure there are no stray debugging leftovers, surprise code changes that I didn't expect, or commented out sections that need to be uncommented. I find this habit to be a valuable tool in reducing bugs. Via Bash, it is much harder to quickly scan large amounts of code. Another example where GUI is better is when resolving merge conflicts. Again, the ability to see large amounts of code, in this case side by side, makes Bash the lesser tool when compared to GUI. Finally, viewing the changes log is something I do often; GUIs tend to have log features that the default git log command doesn't support: A graph showing how the branches are connected, changed files for each commit, etc.
Therefore, I came up with a few shortcuts that trigger the GUI from Bash, winning me both the flexibility of command line and the ease of use of large graphical screens when I need them. In this tip I will be demonstrating with the TortoiseGit GUI, but the same principle can apply to any GUI that offers command line arguments.