var copyOfArray = originalArray.slice();Apparently
Array.slice
, if called with no parameters, returns a copy of the entire array. Kinda cool!
This is just a spot to keep miscellaneous links. It also shows you what a geek I am.
var copyOfArray = originalArray.slice();Apparently
Array.slice
, if called with no parameters, returns a copy of the entire array. Kinda cool!
var patient = new Patient { AccountNumber = accountNumber };And the same code using ReSharper formatting (Ctrl-K Ctrl-F):
var patient = new Patient {AccountNumber = accountNumber};I would have thought that ReSharper would take over the Ctrl-K Ctrl-D and Ctrl-K Ctrl-F keyboard shortcuts, but it does not.
"Turns out environment variables for ASP.NET Core projects can be set without having to set environment variables for user or having to create multiple commands entries....
"This way you do not have to create special users for your pool or create extra commands entries inproject.json
. Also, adding special commands for each environment breaks build once, deploy many times' as you will have to calldnu publish
separately for each environment, instead of publish once and deploying resulting artifact many times."
$ git tfs clone https://tfsserver/tfs/DefaultProjectCollection/ "$/path/to/tfs/project"
TFS repository can not be root and must start with "$/".
You may be able to resolve this problem.
The solution? Prepend MSYS_NO_PATHCONV=1 to the command, e.g.:$ MSYS_NO_PATHCONV=1 git tfs clone https://tfsserver/tfs/DefaultProjectCollection/ "$/path/to/tfs/project"
Initialized empty Git repository in C:/Projects/path/to/tfs/project/.git/
Fetching from TFS remote 'default'...
C6782 = 81584efc08348f7dc4c81297e4e82115789a1e3d
C6784 = 6a6a8bd55111286b24c7acd4825e4ef79030d693
C6863 = 60e8369f34b16a6123d7ed22bf60e59db46ee2e9
etc.
$ echo "* text=auto" >>.gitattributes $ rm .git/index # Remove the index to force Git to $ git reset # re-scan the working directory $ git status # Show files that will be normalized $ git add -u $ git add .gitattributes $ git commit -m "Introduce end-of-line normalization"Source: http://git-scm.com/docs/gitattributes#_end_of_line_conversion
rm .git/index
followed by git reset is the same as git rm --cached -r.) [EDIT: I realize upon studying this that this version will touch all files in the source tree, whereas the version above does not.]$ echo "* text=auto" >>.gitattributes $ git rm --cached -r . $ git reset --hard $ git add . $ git commit -m "Normalize all the line endings"Source: Refreshing a repository after changing line endings (Github)
$ git rm --cached -r . $ git add .gitignore $ git add . $ git commit -m "Remove ignored files."
git reset
vs git reset --hard
git reset
and git reset --hard
in the Github approach. I'll have to think about that another time. :)
git merge-file
, which redoes the merge -- looks particularly interesting and powerful and helps out in the classic newlines style situations I often find myself in.Do Set WSHShell = WScript.CreateObject("WScript.Shell") WSHShell.SendKeys ("{SCROLLLOCK}") Set WSHShell = Nothing WScript.Sleep (2*1000) LoopSave as a VBS and run on whatever machine you want to stay open.
Do
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.SendKeys ("{SCROLLLOCK}{SCROLLLOCK}")
Set WSHShell = Nothing
WScript.Sleep (60*1000)
Loop
$ git rm --cached -r .Step 2 (optional): if it wasn't already present, add the .gitignore folder obtained from, e.g. the gitignore project:
$ git add .gitignoreStep 3: add back the folder
$ git add .
$ git commit -m "Remove ignored files."Voila! The resulting commit status (or diff) will show all undesired files being removed.