Lockboxdata.com – secure, online stuff

So a while ago – in fact years ago – I had this idea. I thought, “what happens if something happens to me or my house?” I mean, would my wife know the username and password to my business account? Where the life insurance is? What we need is an online lockbox to save this stuff. So – I wrote Lockboxdata.com. It does all that and more. You can share documents safely and keep all sorts of records. The data is all encrypted and each account has it’s own key.

Anyway – if you want to use it – use the code LBOXWELCOME for a free account.

Todd

Geeks and Message Boards

When I go to a message board and ask something like, “how do I limit port 3306 to one computer using iptables?” and you know the answer, please just answer the damned question. I know you have it in your iptables config file. It is probably simple. Don’t point us to a website on iptables (we already found that and said, “WTF?”. Copy the lines in question and post them.

Some of us like to go outside. We want to get the answer and use it. We do not want to understand every technology like you do. The ones we use all the time we’ll master. These other things – no chance.

Then there are the, “oh – a newbie question – what goes in the newbie section” responses. You know what? Bite me. Once again we are trying to solve a problem. Answers like that do not help. They piss us off.

There. I said it. I will probably loose my geek membership card but that’s okay with me.

by the way – here is the answer that worked for me:


/sbin/iptables -A INPUT -i eth0 -p tcp --dport mysql -j DROP
/sbin/iptables -A INPUT -i eth0 -p udp --dport mysql -j DROP
/sbin/iptables -I INPUT -i eth0 -p tcp -s 55.55.55.55 --dport mysql -j ACCEPT
/sbin/iptables -I INPUT -i eth0 -p udp -s 55.55.55.55 --dport mysql -j ACCEPT

just replace 55.55.55.55 with the ip you need to allow

Disconnected Recordsets in ASP

I am a huge fan of disconnected recordsets especially when we are displaying reports or any other database driven content on a web page. Once the data is returned to the recordset object, why maintain a connection to the database? Let it go do database things and let the web server play with the data. Here is my function. I call it getrs() because I am lazy. Most of it I copied from somewhere. I also assumes you have an open global database connection called db and a table called SQLError (for logging purposes).

Function GetRS(strSQL)

Const adOpenStatic = 3
Const adUseClient = 3
Const adLockBatchOptimistic = 4


Dim oRS
Set oRS = Server.CreateObject("ADODB.Recordset")
oRS.CursorLocation = adUseClient
on error resume next
err.Clear
oRS.Open strSQL, db, adOpenStatic, adLockBatchOptimistic
if err <> 0 then
dim rsx
set rsx=server.CreateObject("adodb.recordset")
rsx.open "select * from sqlerror where 1=2",db,3,2
rsx.addnew
rsx("page")=request("page")
rsx("sql")=strsql
rsx("username")=session("uname")
rsx.update
rsx.close
set rsx=nothing
response.write "Your request created a system error. The error has been logged. Please make sure any fields you entered are the correct data types. "
response.end
end if
Set oRS.ActiveConnection = Nothing
Set GetRS = oRS
End Function

And you use it like this:

set rs=getrs("select username from users")
while not rs.eof
response.write rs("username") & "<br>"
rs.movenext
end
%>

It is simple and makes reading your code pretty damned easy. An added benefit is that you can move to the end of the recordset with rs.movelast and then move to the first with rs.movefirst as often as you’d like.

Android Text Messaging and the Damned Small Fonts

So – you can’t change the font settings on android phones. Stupid. Some of us have passed the big four oh and can’t see good any more. What’s my solution?

Download Handcent. It has a bazillion options – including fonts, colors, themes and it is free. It does have some ads in the admin section and i’d be happy to pay a buck or three to use this software. So far, I like it.

Can’t find that file?

Too many times I have needed to find a piece of code that calls a view, proc or table. If you are using any of Microsoft’s developer products you can do “Find in solution” but it takes a month. You can also go to the server, browse to the folder and click search only to get no results. Well, I have a solution.

Unix and Linux people may remember grep. Well, there is a windows version called Wingrep ( http://www.wingrep.com/ ). Install it. Use it. Find the files you need.