SPF, Sender-ID, Domain Keys, DKIM, DMARC - Yikes!

(This is going to be a slowly evolving document as I have time to learn more about this) SPF (Sender Policy Framework) - domains add a DNS TXT or newer, SPF, record which enumerates which mail servers are allowed to send mail on their behalf. They also can indicate what the recipient should do with mail not coming from one of the listed mail servers. Pros: Simplicity. Can be implemented in a few minutes.

SQL Server: Processes and Statistics commands

I frequently forget these. sp_who2 shows you the processes that are currently running. Using sp_who2. (Code for a better sp_who2 sproc: http://sqlserverplanet.com/dmv-queries/a-better-sp_who2-using-dmvs-sp_who3/) Shows you the last statement sent from a client: Kill process: Show IO statistics for query: SET STATISTICS TIME ON Show how long parse, compilation, and execution of a query takes:

Difference between object and data structures

I’ve been reading Clean Code by Robert C. Martin and really appreciated how he described the distinctions between objects and data structures: “Objects hide their data behind abstractions and expose functions that operate on that data. Data structures expose their data and have no meaningful functions.” “Object expose behavior and hide data. This makes it easy to add new kinds of objects without changing existing behaviors. It also makes it hard to add new behaviors to existing objects.

Pessimistic vs Optimistic concurrency control

From http://msdn.microsoft.com/en-us/library/ms189132.aspx (emphasis mine) Pessimistic concurrency control A system of locks prevents users from modifying data in a way that affects other users. After a user performs an action that causes a lock to be applied, other users cannot perform actions that would conflict with the lock until the owner releases it. This is called pessimistic control because it is mainly used in environments where there is high contention for data, where the cost of protecting data with locks is less than the cost of rolling back transactions if concurrency conflicts occur.

SQL Ranking Functions

Rank: Returns the rank of each row within the partition of a result set. The rank of a row is one plus the number of ranks that come before the row in question. If two or more rows tie for a rank, each tied rows receives the same rank. For example, if the two top salespeople have the same SalesYTD value, they are both ranked one. The salesperson with the next highest SalesYTD is ranked number three, because there are two rows that are ranked higher.

CKEditor for WordPress using HTTPS when it's not suppose to

I’m runnin WordPress on IIS. The latest version of CKEditor for WordPress seems to have an issue where I’m accessing the admin area with HTTP, but all the urls it generates (images, js files, etc) are being requested through HTTPS. I noticed it because I don’t have HTTPS bound to my site at the moment and all of the CKEditor assets couldn’t be found. Digging in a bit, I found these lines in ckeditor_class.