Tuesday, December 8, 2015

Configuring git to use winmerge

Using github desktop, open a Git Shell (I have it configured to use Git Bash).
Then these commands to configure merge and diff tools (assuming you have winmerge installed):

git config merge.tool winmerge --global
git config diff.tool winmerge --global


And then to use it, type this in Git Bash:

git mergetool

(reference)

Tuesday, August 4, 2015

Newspaper columns

Quoted from this StackOverflow thread:

Using the column direction for Flexbox requires an explicit height in order for wrapping to work (see:http://codepen.io/cimmanon/pen/oyilE).
If you want to have newspaper style columns without using explicit heights, the multi-column module is what you're looking for.
http://codepen.io/cimmanon/pen/CcGlE
(Compass multicolumn module)

Friday, May 1, 2015

CSS3: apply styles to child nodes based on the number of siblings they have

Quoting this answer by Lübnah to the question can CSS detect the number of children an element has :


Clarification:
Because of a previous phrasing in the original question, a few SO citizens have raised concerns that this answer could be misleading. Note that, in CSS3, styles cannot be applied to a parent node based on the number of children it has. However, styles can be applied to the children nodes based on the number of siblings they have.

Original answer:
Incredibly, this is now possible purely in CSS3.
/* one item */
li:first-child:nth-last-child(1) {
    width: 100%;
}

/* two items */
li:first-child:nth-last-child(2),
li:first-child:nth-last-child(2) ~ li {
    width: 50%;
}

/* three items */
li:first-child:nth-last-child(3),
li:first-child:nth-last-child(3) ~ li {
    width: 33.3333%;
}

/* four items */
li:first-child:nth-last-child(4),
li:first-child:nth-last-child(4) ~ li {
    width: 25%;
}
Credit for this technique goes to André Luís (discovered) & Lea Verou (refined).
Don't you just love CSS3? :)
Sources:

Monday, April 13, 2015

Exposing functions that are inside a closure

Learned a lot from response in this thread:
You expose functions or properties of a closure by internally declaring them in this scope (which can change depending on invocation).

Saturday, April 11, 2015

Grunt and npm notes

SASS notes

Icon Fonts are Awesome

​First saw this demo page:  Icon Fonts are Awesome.

And then read the article about it.

Then tried it out using Icomoon's tool/app (after seeing how to use Icomoon icons with SASS).

How to write cleaner CSS and smarter SASS

How to write cleaner CSS and smarter SASS
Anthony DiSpezio explains how to leverage mixins and extends at the same time, to write smarter Sass and cleaner CSS.

Saturday, March 14, 2015

Cannot update Windows with error C80003F9

Clearing the SoftwareDistribution folder fixed it.  Steps here.
Essentially:  stop the Windows Update service, then rename the SoftwareDistribution folder under %windir%, and then restart the Windows Update service.

Tuesday, February 10, 2015

Notes on querying metadata in SharePoint 2013


CAML Query with Managed Metadata (quote):
Just use the field as you would any lookup, basing your query on the display value, not the ID. SharePoint will support any types of queries you can on a text field, such as equals, contains or begins with. So you can even enter just a couple of characters and receive search results! Something like this works great:
<where>
<contains>
<fieldref name="ManagedMetadata">
<value type="TaxonomyFieldType">My Value</value>
</fieldref>
</contains>
</where>

Managed MetaData “ampersand” values
Essentially, this works:
<Eq>
<FieldRef Name='MyTaxonomyField' />
<Value Type='TaxonomyFieldType'>Science \uFF06 Technology</Value>
</Eq>