Latest Posts

Updated Squid 3 configuration

Here is the up­dat­ed ver­sion of my [pre­vi­ous au­then­ti­cat­ing/for­ward­ing Squid 3 con­fig](http://non­graph­i­cal.com/2008/09/squid-3-proxy-chain­ing/). It adds some things and fix­es some things. In par­tic­u­lar, the peer ex­clu­sion rules from the pre­vi­ous con­fig were not work­ing - this one should cor­rect­ly *not use* the par­ent prox­ies when query­ing “lo­cal ad­dress­es”. As be­fore, the con­fig­u­ra­tion file con­tains two proxy servers for load bal­anc­ing; it can be ex­tend­ed easi­ly to in­clude more. Read more…

A tool for removing duplicate files

[Down­load Re­moveDu­pli­cates.py][dl]

[dl]: http://non­graph­i­cal.com/me­dia/uploads/Re­moveDu­pli­cates.py

One of the prob­lems with us­ing hy­brid Win­dows and Lin­ux en­vi­ron­ments is that one needs to watch close­ly for filesys­tem and file anoma­lies and in­con­sis­ten­cies. Dif­fer­ing end-of-line mark­ers, for ex­am­ple, cause many prob­lems when shar­ing files be­tween the two op­er­at­ing sys­tems. One par­tic­u­lar prob­lem I’ve run in­to is that of hav­ing du­pli­cate files, or in other words, mul­ti­ple files with the same file­name. This can hap­pen if, say, you copy a di­rec­to­ry some­where in Win­dows, then switch to Lin­ux and use a tool such as rsync to copy that same di­rec­to­ry over again. If the cap­i­tal­iza­tion is dif­fer­ent, Lin­ux will not re­place the old files, be­cause Lin­ux, un­like Win­dows, is case-sen­si­tive. This will even hap­pen, and is tech­ni­cal­ly ac­cept­able, on NTFS filesys­tems.

The so­lu­tion I’ve come up with is this sim­ple script, called Re­moveDu­pli­cates.py. Ob­vi­ous­ly, you need [Python][py] in­stalled to run it, but it has no ad­di­tion­al de­pen­den­cies. Sim­ply run it *in the di­rec­to­ry you wish to clean*, and it should do the rest. Note that you shouldn’t use this for en­tire filesys­tems (yet), be­cause it will use ridicu­lous amounts of mem­o­ry if it is given a high num­ber of files. [Down­load it here][dl]!

[py]: http://www.python.org/

P.S. Al­so, I can­not guar­an­tee that this tool will work as in­tend­ed or will be bug-free. Use wise­ly.

Programming Club!

Hel­lo, fel­low pro­gram­mers! I’ll be post­ing use­ful in­for­ma­tion, prac­tice, tu­to­ri­als, re­sources, and all other things vague­ly pro­gram­ming-re­lat­ed here. Soon there will be post­ed a gen­er­al out­line of what’s go­ing to be hap­pen­ing this year, but for now, just let me say that we’ll be work­ing main­ly with web ap­pli­ca­tions and web de­vel­op­ment. It should be pret­ty ap­par­ent from read­ing re­cent tech­nol­o­gy news that the IT world is fo­cused on two main trends right now: web apps and the even­tu­al “web desk­top,” and of course server vir­tu­al­iza­tion. Suf­fice it to say that, after you’re through with this year’s pro­gram­ming club, you should have a very work­able ba­sic un­der­stand­ing of how the In­ter­net works and how to write ap­pli­ca­tions that are web-ac­ces­si­ble.

So with that said, our con­crete goal for the mo­ment is to be­come rel­a­tive­ly flu­ent in HTML and CSS. We won’t learn too much, just enough to un­der­stand how it all works and how to make it work for us. The­se two lan­guages will en­able us to cre­ate de­cent-look­ing web pages and will al­so provide the pre­sen­ta­tion lay­er of our later web de­vel­op­ment work.

Stay tuned for more in­for­ma­tion. I find this all rather ex­cit­ing, and I hope you guys do too!

Squid 3 authenticating proxy chaining

My school us­es an NTLM-au­then­ti­cat­ing proxy server, and this caus­es prob­lems with lots of ap­pli­ca­tions which don’t sup­port proxy servers. Many, many so­lu­tions have been pro­posed to this prob­lem, but I’ll fo­cus on one that I find par­tic­u­lar­ly ap­peal­ing: set­ting up a non-au­then­ti­cat­ing per­son­al proxy server which for­wards re­quests to the main proxy server.

**Up­date: use the [new ver­sion of this con­fig file][new­con­fig] - it works bet­ter.**
[new­con­fig]: http://non­graph­i­cal.com/2008/11/up­dat­ed-squid-3-con­fig­u­ra­tion/
Read more…

Google Chrome - first impressions

So here it is, fi­nal­ly: the le­gendary [Google browser][chromeurl].

[chromeurl]: http://www.google.com/chrome

And like ev­ery­thing else that Google puts out, it is a glo­ri­ous­ly in­cred­i­ble piece of work. It has the best char­ac­ter­is­tics a piece of soft­ware could have: it’s sim­ple, fast, re­spon­sive, and stable. I’ve been run­ning it for just a lit­tle while now, and while We­bKit’s ren­der­ing (espe­cial­ly of fonts) is slight­ly dif­fer­ent from Gecko’s, ev­ery­thing works just about the same as in Fire­fox… it’s all just way, way faster. Open­ing new tabs is faster. Us­ing Gmail is faster (thanks, no doubt, to the new V8 JavaScript engine). Writ­ing posts is faster. It’s re­al­ly quite in­cred­i­ble… in fact, pos­si­bly one of the most im­pres­sive open-source de­vel­op­ments to date, right up there with Fire­fox 1 and the Lin­ux ker­nel. [Give it a spin your­self and see][chromeurl].

Projects

Pages


Articles

Reviews

Categories

Tags

Archives

Meta

Powered by WordPress
0.40 seconds