Thursday, November 06, 2014

ConEmu - a Console Emulator for Windows That You Need Now

You owe it to yourself to download ConEmu. It removes all the awfulness of the standard Windows cmd terminal. Things like selecting text are much easier and more natural.
By default to copy text from the console you execute hold down the left-shift key (it's different than the right-shift key), then left-mouse button to highlight and it selects over the carriage returns. If you like block copies select alt-left-click.
I recommend a few changes: Open the Settings Window by selecting the right-most icon with three bars:


Select "Keys & Macro"/Paste/ and set "Confirm pasting more than" to 20000 chars and uncheck "Confirm <Enter> keypress" so it does not nanny you to death by asking if you know you have an <enter> in your selection.
Select "Main/Confirm" and uncheck the top 5 boxes so you won't be nannied to death.
Optional: To prevent a hotkey collision with Mezer tools, remove the hotkey for Win-S by going to "Keys & Macro", select Win-S and reassign the hotkey.

How to delete the log file from sql server databases

Disclaimer: This process should not be done with databases that you really care about. This procedure is only for dev/testing environments, not for production databases. I'm using Sql Server 2008R2.

Often the log file, ".ldf", can be quite large. If it's a production database you need it, but for databases you are using for dev and testing, you can remove it carefully to save space.
Here's the steps:
  1. In Sql Enterprise Manager "detach" the database - this won't hurt it, don't worry.
    This will bring up another window and just select "OK".
  2. Then in File Explorer append ".bak" the ldf filename - just in case we need it. Location may vary, on my box it's in "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA"
  3. Attach the database
    This will bring up a window. In the upper panel select "Add" and give the location of your .mdf file.
    Now comes the tricky part, in the lower panel select the log file and then select "Remove". Then select "attach", and voila, your old boat-anchor of a log file is now gone from your database!
  4. If all goes well, delete the renamed ".ldf" file.
Did I mention that you should not do this with databases you care about?

Tuesday, October 28, 2014

Vladimir Putin is the Future of America


From www.kremlin.ru via wikimedia
Most American citizens do not appreciate how truly dangerous the National Security Agency’s domestic surveillance program is. No less than our Republic itself is threatened.

The danger is that an insider from the NSA could seize power in the United States.
Sound farfetched? Vladimir Putin, a former KGB officer, took Russia from a democracy to a kleptocracy powered by his old KGB buddies. Someone from the NSA can do something quite similar in America.

Here are the steps:

1. The president succumbs to the temptation to use information gleaned from NSA surveillance to blackmail his opponents. You can imagine the phone call that results:

"Senator, I know you are planning to vote against the President's bill tomorrow, but just think of the consequences. We know you have nothing to hide, but your nephew has been looking at some sketchy websites; if this gets out he could go to prison. And your brother has been caught on tape to his accountant doing some very creative tax avoidance that could land him in jail as well. Oh, and one of your major donors has been doing some insider trading. So think carefully about how you vote tomorrow."

2. After a while, the NSA will tire of just pulling the strings for the president and want to put their own man in the White House. The NSA can try to blackmail all the good candidates out of the race. If that fails they can target the donors. If word leaked out that donors to a candidate were being
personally investigated by various governmental agencies, donations would dry up—along with any chance of winning an election.

The concentration of power in the NSA is incompatible with democracy. Vote for candidates who support reigning in domestic surveillance, unless you really admire what Vladimir Putin has done in his former democracy.

Friday, October 17, 2014

CITCON Austin 2014

CITCON, the Continuous Integration and Testing Conference, is in Austin this year! Here's a few pics of the opening night of the Open Spaces Conference, hosted by our friends at BuildASign.com. Saturday
My jumbled Notes:
Interesting conjecture: In the future, we will not write code, just write tests.
Some companies automatically deploy code if it passes tests.
Works well with apps made of many samll services.
Avagandro's Court, book about AI taking over company
"Her", man falls in love with OS
Vagrant defines machines to be built
Stackengine.com has two articles by Boyd about Vagrant.
Puppet/Chef/Ansible are deployment packages; ansible has the lowest learning curve
Vagrant Can be used with AWS to spin up a machine
"Continuous Delivery" book was recommended
Docker 1.3 just released, transition to Docker completely.
Bamboo
Ansible is the easiest to learn and implement only use python
Chef meetup wednesday in Austin / irc channel / Ansible meetup as well
Vagrant was written by Mitchell ... because he hated virtualbox

Monday, September 08, 2014

Pictures from Agile Austin September 2, 2014

Matt Roberts gave a talk entitled, Continuous Agile Planning that the Dev Team and the Biz Guys can Like Like"
If you have been thinking about attending Agile Austin, but not sure what is was like, I've taken a few pictures for you:
Lots of friendly people.  

Free beer and food
  Interesting talks: My notes from Matt's talk:
At Spotify the teams are organized into squads/tribes/clans/guilds.
Assumptions are forgotten, estimates are not.
Planning is the gateway drug to estimating
Scott Killen: "Tell a story, make a point."
Fastest way to more capacity is to not do wasteful tasks.

Thursday, August 28, 2014

0x80070003 HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.

While deploying a aspx app, I kept getting this error:
0x80070003 HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070003
Config Error Cannot read configuration file
Config File \\?\E:\Inetpub\wwwroot\MyApp\4.1\web.config


Naively, I believed the error message and thought my web.config was bad xml. But checking an online xml validator, the file was fine.

I then looked at permissions, and temporarily giving everyone permission to read the file didn't help.

I finally found and article here that cast a thin ray of light upon my troubles.

The clue was the "\\?E:\Inetpub\wwwroot\MyApp\4.1\web.config" line. I was making my test machine look more like production machines by creating a fake E: drive using
subst E: "C:\Edrive"
But IIS was not able to grok the fake E: drive. In the IIS GUI I right-clicked on the application and selected "Manage Application/Advanced Settings/Physical Path" and changed that from "E:" to "C:\Edrive" and it worked.

Thursday, August 14, 2014

Pictures from Austin .Net Users Group August 11, 2014 with Patrick Abbs.

Patrick Abbs gave a great presentation on "Modern Artificial Intelligence for the Curious Layman" to the Austin .Net Users community. Patrick had an intriguing example of using a Neural Net to classify instruments playing a 'C' note.
Here's a few pics:

My jumbled notes:
  1. Neural Networks are a type of Machine Learning algorithm used for object categorization and recognition.
  2. Neural networks work by creating a hierarchical structure of more complex objects and their components.
  3. Fourier Analysis was used in Patrick's example to simplify complex wave forms into simple sine waves.
  4. The human ear component, the cochlea, decomposes sound into a series of sin waves in an unknown manner.
  5. Neurons hold electrical charge. Axons are limit switches.
  6. Apple's Siri is run by a Hidden Markov algorithm, while Google is investing in Neural nets.
  7. "Equational vs. Structural" was his main theme.
  8. Patrick had three types of Neurons in his example program: 1. Input Nueron 2. Abstration Neuron 3. Monitor Neuron
  9. contacts: twitter @patricks github/patricks