Visual Studio Code: hide .js and .js.map files

In File > Preferences > User Settings hide .js files when there is a matching .ts file.

{
 "files.exclude": {
 "**/.git": true,
 "**/.svn": true,
 "**/.hg": true,
 "**/.DS_Store": true,
 "**/*.js": {"when": "$(basename).ts"},
 "**/*.map": {"when": "$(basename).map"}
 }
}

Downgrade Nuget package

As of Nuget 2.8 there is a feature to downgrade a package.

Nuget 2.8 Release Notes

Example:

The following command entered into the Package Manager Console will downgrade the couchbase client to version 1.3.1.0

Update-Package CouchbaseNetClient -Version 1.3.1.0

Result:

Updating 'CouchbaseNetClient' from version '1.3.3' to '1.3.1.0' in project [project name].
 Removing 'CouchbaseNetClient 1.3.3' from [project name].
 Successfully removed 'CouchbaseNetClient 1.3.3' from [project name].

Something to note as per crimbo below:

“this approach doesn’t work for downgrading from one prerelease version to other prerelease version – it only works for downgrading to a release version”

Source: http://stackoverflow.com/questions/10206090/how-to-install-an-older-version-of-package-via-nuget

Simple regex

Regex quick reference

 

[abc] A single character: a, b or c
[^abc] Any single character but a, b, or c
[a-z] Any single character in the range a-z
[a-zA-Z] Any single character in the range a-z or A-Z
^ Start of line
$ End of line
\A Start of string
\z End of string
. Any single character
\s Any whitespace character
\S Any non-whitespace character
\d Any digit
\D Any non-digit
\w Any word character (letter, number, underscore)
\W Any non-word character
\b Any word boundary character
(…) Capture everything enclosed
(a|b) a or b
a? Zero or one of a
a* Zero or more of a
a+ One or more of a
a{3} Exactly 3 of a
a{3,} 3 or more of a
a{3,6} Between 3 and 6 of a

options:

i case insensitive
m make dot match newlines
x ignore whitespace in regex
o perform #{…} substitutions only once

Cheatography

Um site que cataloga cheat sheets.

Fica aqui o registo de algumas sheets que são úteis para mim:

  • http://www.cheatography.com/davechild/cheat-sheets/mod-rewrite/
  • http://www.cheatography.com/davechild/cheat-sheets/php/
  • http://www.cheatography.com/davechild/cheat-sheets/regular-expressions/
  • http://www.cheatography.com/davechild/cheat-sheets/mysql/
  • http://www.cheatography.com/davechild/cheat-sheets/html-character-entities/

Plugin para criar mapas subterrâneos

Subway Map Visualization jQuery Plugin – http://www.kalyani.com/2010/10/subway-map-visualization-jquery-plugin/

 

Com este plugin jQuery é possível criar mapas de visualizações subterrâneas.