Search

Categories

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Send mail to the author(s) E-mail

# Wednesday, 06 April 2016
( Git )

I’ve come across a situation where the only way to have git is to install it locally, then push to a safe backed up fileshare.

Setup a bare repo on the fileshare

j:\git\test
git init –bare

Add a remote

c:\dev\test
git init
git add .
git commit –m “initial commit”
git remote add origin file://j:\git\test  -- add a remote called origin…  note file://h:\\git\\booktech notice escapes in gitbash
git push --set-upstream origin master

Clone test

c:\dev\test2
git clone j:\git\test .

| | # 
# Tuesday, 29 March 2016

https://chocolatey.org/

“Chocolatey is a package manager for Windows (like apt-get or yum but for Windows). It was designed to be a decentralized framework for quickly installing applications and tools that you need. It is built on the NuGet infrastructure currently using PowerShell as its focus for delivering packages from the distros to your door, err computer.”

  • Open Cmd prompt as admin
  • Paste in code
  • choco

image

https://chocolatey.org/packages

choco install ccleaner

Very useful for new build!

| | # 
# Thursday, 24 March 2016

for %%a in ("*.mp4") do ffmpeg -i "%%a" "newfiles\%%~na.mp3"

Pause

Converts all mp4's in directory to newfiles\

Open ffmpeg in its own cmd shell

| | # 
# Friday, 19 February 2016
( Azure )

“The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.”

http://stackoverflow.com/a/18938991/26086

<httpErrors existingResponse="PassThrough"/>
| | # 
# Wednesday, 17 February 2016
( MVC5 )

http://stackoverflow.com/questions/18570158/handling-singular-and-plural-controllers-routes/21227932#21227932

From this answer I’m considering the Authors and Books example I am building:

/Authors                               - list of Authors (multiple)
/Authors/1                           - individual Author  (this is the only non default route in MVC)
/Authors/Create                 - create an Author
/Authors/Edit/1                   - edit an Author
/Authors/Delete/1              - delete an Author


/Authors/Search?lastName=mateer  - search for an Author lastName=mateer
/Authors/Search?tab=newest&lastName=mateer

/Authors/1/Dave-Mateer   - individual Author  (first name / last name)

Database

image
Pluralising the table name.  Discussion here: http://stackoverflow.com/questions/338156/table-naming-dilemma-singular-vs-plural-names?rq=1
A descriptive auto-inc ID.

Stored Proc Parameters

CREATE PROCEDURE [dbo].SearchAuthorByLastName
    @LastName varchar(255)
AS
    SELECT * FROM [Authors] WHERE LastName like '%' + @LastName + '%'

Use capital letters for SP parameters

| | #