LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

Learning Ruby on windows: First steps in rails scaffolding

Introduction So this morning I started with rails and created my first application, of course this had to be an hello world type of application. Now I would like to make something a bit more challenging. A plant database with a name, the height and the color of that plant. I said a bit challenging not very challenging. But it was challenging enough. Scaffold I would recommend reading this guide to get more of the details.

Read More...

Learning Ruby on windows: First steps in rails using Rubymine.

Introduction In my attempt to learn Ruby and now rails the hard way I use Rubymine. So my next step is to install rails and get something on the screen. Installing rails in Rubymine First thing I did was to make a new Rails project or application as they call it. So I clicked the necessary buttons and got told that rails was not installed. Which made me click the … button next to where it say no rails found and it started installing rails.

Read More...

SQL Injection Pocket Reference for MySQL, SQL Server and Oracle

There is a nice SQL Injection Pocket Reference up on Google Docs Here is what is covered MySQL Default Databases Comment Out Query Testing Injection Strings Numeric In a login Testing Version MySQL-specific code Database Credentials Database Names Tables & Columns Finding out number of columns Retrieving Tables Retrieving Columns PROCEDURE ANALYSE() Retrieving Multiple Tables/Columns at once Find Tables from Column Name Find Column From Table Name Avoiding the use of single/double quotations

Read More...

What Gordon Ramsay Can Teach the IT Industry

Recently I found Gordon Ramsay’s Kitchen Nightmares on Netflix. Each episode of this show starts with a restaurant that is on the brink of collapse and follows Gordon through his efforts to help the owners turn their restaurant around. Usually I don’t enjoy reality shows, but along with the drama and swearing there are a lot of great takeaways (no pun intended) for us as IT people. The five that initially occurred to me are Simplicity, Authenticity, Communications, Consistency, and Leadership.

Read More...

How to find what column caused the String or binary data would be truncated message

Sometimes you get data from Excel or another system and you need to import that data into your tables. Some people will use an import wizard and all the columns will be nvarchar(255) in the import table Here is an example of a table created by the import/export wizard based on an Excel file CREATE TABLE [dbo].[Sheet1$] ( [emailaddress] nvarchar(255), [Value] nvarchar(255), [CategoryName] nvarchar(255), [CategoryDescription] nvarchar(255), [CategoryID] float, [UserAdditionalInfoTextValue] nvarchar(255), [F9] nvarchar(255) ) Sometimes the data that you are importing won’t fit into your column and you get the helpful String or binary data would be truncated message.

Read More...

Getting chocolatey or other powershell scripts to work when behind a proxy

Introduction So I played with chocolatey this weekend and found it intriguing. It is an easy way to install things and update things. Things like nodejs that are in a constant flux for the moment. And chocolatey worked great at home. Alas, at work it did not work. Because we are behind a giant PITA of a proxy. Ours is a squid proxy and thus not NTLM. So I set about changing chocolatey to make it work.

Read More...

Don’t forget to clean up your teamcity mess

Introduction I’ve been using teamcity for a while now and just used it on a VM with limited diskspace. 40GB for a windows 2008 R2 server isn’t all that much. But it still has a couple of Gigabytes left over so why should I worry… Yeah right. Today I got this message from teamcity. Warning: insufficient space on disk where the following directory resides c:/users/… Disk space available: 1009.

Read More...

My ruby posts

This last weekend I had some time and I started learning Ruby. I made several posts and I plan to do more so I thought I needed a place to list them all. I have a few about Ruby and about Rubymine so I will categorize them as such. Ruby Learning Ruby on windows: step 0 About how to install ruby and rubymine. Learning Ruby on windows: Step 0.1 testing the hello world

Read More...

Chocolatey: apt-get for windows

Introduction Today I read that nodejs was available on nuget. I wonder why that would be and what extra value that would add to my project. After all nuget is there to install dependent package to my project and keep them up to date. Then I found out that it needed the chocolatey package. The chocolatey package is not really a typical nuget package either. It just uses nuget to get installed.

Read More...

Learning Ruby on windows: step 1.3 inheritance

Introduction In my previous post I talked about interfaces. In this one I just do simple inheritance with the same classes as in the previous post. More difficult scenarios are possible but We should watch out with inheritance because it can get to complex very fast. Try to avoid complex inheritance trees. Inheritance class Plant attr_accessor :name end class Animal < Plant end Yes Animals inherit from Plants because they share the same property so there.

Read More...