Posts Tagged ‘tech’

Running gvim in the background by default

Tuesday, September 21st, 2010

I am constantly running gvim from the bash prompt within Cygwin, and loosing control of my session. I’d have to quit gvim, and restart it in the background.
Finally got around to fixing that. Put this in your .bashrc:

function gvimBackground() {
/cygdrive/C/Program\ Files/Vim/vim72/gvim.exe $@ &
}
alias gvim=gvimBackground
alias vi=gvim
alias vim=gvim

Using Squid as a centralised Proxy

Thursday, September 16th, 2010

Many programs do not use the built in XP proxy configuration. Firefox, Dropbox, Google Translate Client to name a few.
Moving between networks is a pain, and I had previously tried to automate the task of changing the proxy settings, with mixed results.
Enter Squid.
This article explains how to configure it to connect to an parent proxy that requires authentication.
Make sure you change the http_port parameter to only bind to 127.0.0.1, unless you’re doing something sneaky with your iPad, which cannot use the parent proxy….

Update:
A few more usefull tidbits:

  • Install Squid as a service with the -i command line option
  • Start and Stop with the net start|stop commands
  • You should modify the ACLs from those in the article linked above. Here are mine:

acl localhost src 127.0.0.1/255.255.255.255
acl all src 0.0.0.0/0.0.0.0
acl INTERNAL src 172.28.0.0/255.255.252.0
acl NAUGHTY_STUFF dstdom_regex →
  -i "etc/domain_blacklist"

http_access deny NAUGHTY_STUFF

http_access allow manager localhost
http_access deny manager

http_access allow localhost
# http_access allow all
http_access deny all

Mysterious hidden proxy settings

Tuesday, September 7th, 2010

Well OK, not mysterious, and not really hidden.  And I did cause it, but since I had forgotten what I did, I had a hard time finding it.

Normally, to configure a proxy, you go into Internet Options -> Connections -> LAN settings.  At least that’s how you do it on XP; Windows 7 is different.
These settings are stored in the registry thus:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"MigrateProxy"=dword:00000001
"ProxyEnable"=dword:00000001
"ProxyHttp1.1"=dword:00000000
"ProxyServer"="http://ProxyServername:80"
"ProxyOverride"="<local>"
http://support.microsoft.com/kb/819961
I was trying to find a way to modify these settings from the command line, and include it as part of my “fix_routing” script (which needs a write-up).  So I tried some stuff, and it didn’t work, and I gave up and moved on.
This weekend, we set up a SlingBox at a friend’s place, and I found that I couldn’t connect to it.  TCPVIEW showed the program trying to connect to a bogus proxy, and I couldn’t find this anywhere in the configuration file.  Then I remembered my previous attempts, and had to search around for that information again.  Luckily, I found it.
There is another set of settings, stored in the WinHttpSettings key.  These settings do not show up anywhere.  If TCPVIEW is showing that an application is trying to connect to a proxy, and you can’t find where that is configured, try here.
Note: It appears that the REGEDIT search tool will not search inside a REG_BINARY key, which I suppose makes sense.  This was why a search of the registry for the proxy address resulted in no matches.
The only way to modify these settings, is via the PROXYCFG tool in the system32 directory.
C:\Documents and Settings\aujaha>proxycfg
Microsoft (R) WinHTTP Default Proxy Configuration Tool
Copyright (c) Microsoft Corporation. All rights reserved.

Current WinHTTP proxy settings under:
HKEY_LOCAL_MACHINE\
SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\
WinHttpSettings :

Proxy Server(s) :  10.10.0.229:8080
Bypass List     :  *.local;*.big.corp;10.10.*;<local>

I zeroed out this key, and things seem to be working again.

First post from the new iPad

Thursday, September 2nd, 2010

Pretty cool so far. Although I did have to do the “error code 9808″ dance

Blocking content by country is SO LAME

Thursday, July 8th, 2010
Sony blocks video on youtube due to copyright

Sony blocks video on youtube due to copyright

LAME.

I wanted to see the original clip of “Hitler reacts…” and was … BA BOWN … denied.  Even when there are like 102789 parodies out there.

Lotus Notes and the case of the hovering Mouse cursor

Wednesday, July 7th, 2010

Tell me that isn’t annoying.

Hacking ticketmaster

Wednesday, June 16th, 2010

IEEE Spectrum:

On March 1,  four guys behind a Nevada-based start-up, Wiseguy Tickets, were indicted in New Jersey on 43 counts for fraudulently buying and selling over 1.5 million tickets online

To achieve this goal, Wiseguys deployed a nationwide computer network that opened thousands of simultaneous Internet connections from across the United States; impersonated thousands of individual ticket buyers; and defeated online ticket vendors’ security mechanisms.

That may be why their websites suck so badly.

eProductivity and GTD

Thursday, June 10th, 2010

Ok, I’ve never been a big fan of Lotus Notes, especially since we were stuck on version 6 for so long.  For a couple years, I took an Outlook break, and I’m also hooked on Gmail.

The upgrade to version 8 is a huge relief.

My good friend Toby put me onto the book by David Allen, “Getting Things Done”, which is a productivity system that really seems to work.  During my stint with Outlook, I started using the GTD add-in, and loved it so much that the idea of giving it up when I moved back into the Lotus world was a real bummer.

Then I found eProductivity, the GTD solution for Lotus Notes.  It is a replacement of the standard mail template.  I have installed it on my company laptop, without having any special privileges (or permission), and I have had no problems at all with replication or interaction with other corporate applications.  This is a significant statement considering the standard of our IT deparment, and the quality of our internal applications.

Luckily for me, I was an early Beta tester of the 1.x version, and just recently was selected for the 2.x Beta program.

Anyone who is interested should check out the Getting Started Video, and then download the trial template.  They have done a very good job of the trial template – it will copy a sample of your inbox, and guide you through the GTD process of emptying it.

When is NaN.NaN.NaN?

Friday, June 4th, 2010
When is NaN.NaN.NaN?

When is NaN.NaN.NaN?

Trying to select the or results in the pop-up calender dissapearing, and the curious “Not a Number” date appearing.

Summary: it is not possible to enter a date using the pop-up calender  for other than the current month.

The case of the stolen Gizmodo iPhone

Friday, June 4th, 2010

I only have one question.

How the hell do you forget a brand new, super ultra top secret phone, in  a bar?

Wouldn’t you be like, totally worried about someone either seeing, seeing you use it, grabbing it?

Hell, I have a POS BB, and I dont let it leave my sight. (Not because it is any good, but because getting it replaced would take forever, and I’m pretty lost without it)