04.01.06
Posted in web dev at 1:23 pm by Clinton
Just some quick things to look at, so i’ll post here for reference…
clean up your css (without regular expressions :~)
http://csstidy.sourceforge.net/index.php
V.nice xhtml “cheat-sheet”
http://csstidy.sourceforge.net/xhtml.php
Bug tracking without perl - arrrhmen!
http://flyspray.rocks.cc/mainpage
Permalink
03.30.06
Posted in web dev, byteclub at 1:42 am by Clinton
Need to test the new geshi based code syntax highlighter plugin i’ve written for wordpress here… hmmm
Show the list of supported languages [langlist]
Current enabled languages: actionscript, ada, apache, asm, bash, c, cpp, csharp, css, delphi, dos, eiffel, html, ini, java, javascript, js, lisp, matlab, mpasm, objc, oracle8, pascal, perl, php, pseudocode, python, qbasic, ruby, scheme, smarty, sql, vb, vbnet, vhdl, xhtml, xml.
Java code anyone?
for(int i=0; ,i<stuff.length; i++) {
System.out.println(“wow”);
}
Let’s try some pascal…
procedure DoStuff(String str)
var i: int;
begin
for i := 0 to 10 do begin
print(str);
end;
end
Hoorah!
I’ll post details, code and docs on the byteclub wiki after sleep!
Permalink
10.18.05
Posted in web dev, byteclub at 5:14 pm by Clinton
How to use the extension
About the extension
The GeSHi Homepage (the *real* engine behind it all)
Just head over to our own ByteClub wiki and check out one of the code snippets… i tried to update as many as I could so people could see what it can do.
Now, sleep… then some GeSHi to blo!
g hacking… ;~)
Permalink
10.07.05
Posted in web dev at 7:44 am by Clinton
When you have a bit of knowledge, two things happen
1) you become dangerous (proportional to what really *don’t* know)
2) you quickly get annoyed by things that would never have bother you in the past.
:~)
Web browers - firefox - plus a bunch of “extensions”. Now, sitting down at a lab machine that doesn’t even have the pac file set up properly, let alone any nice extensions, is almost (*almost*) as bad a sitting down with fresh install of windows - urgh!
Portable firefox - helps with both 1 and 2 i think.
http://johnhaller.com/jh/mozilla/portable_firefox/
Must do some research…. :~)
Permalink
09.21.05
Posted in web dev at 7:49 am by Clinton
...
if ($permission && file_exists(PATH.$filename)) {
header('Content-Disposition: inline; filename='.$filename);
header('Content-Type: image/jpeg');
header('Content-Length: '.@filesize(PATH.$filename));
@readfile($filename);
exit;
} else {
die('Who the heck are you? - or- What the heck are you asking for?');
}
...
Usually, if i really wanted to make sure that people didn’t cache the content I’d include some extra headers like
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
and I thought this was good. However, recently I used the same technique for a photo-gallery, and noticed that the performance was not good - images were not being cached (exactly what i’d asked for), and I really should have another think about this.
I went over to http://php.net/header but most of the notes people have left are about making sure things are not cached - I now wanted to allow caching for a limited time (say 10 mins).
Anyway, one of the user contributed comments lead me to the web-caching.com site, and they have good info on supporting the use of caching by sending the right headers. In particular I landed on their implementation notes and so I replaced my old cached control header with:
// allow cache for 600 seconds = 10 mins
header('Cache-Control: max-age=600');
and this works as advertised (afaik with the browsers i’ve tested).
Overall, i’ll be thinking about cache headers a little more carefully in future, because caching is not something to be avoided entirely, but used wisely, and makes the net a better place.
$0.05
Permalink
08.02.05
Posted in web dev at 1:18 pm by Clinton
One of my all-time favourite articles A List Aparts
To Hell WIth Bad Browsers/. Its a good read.
While trolling, there are nice collections of templates out there…
ssi-developer
bluerobot
but the one i really like is…
Owen Brigss at thenoodleincident - has very slick presentation, and i’m bloggin it here just so i’ll be able to find it again easily next time i’m starting with a layout! Owen did a great design rant (2001), and emphasises very nicely the multi-layer “onion” (vegetables - their good for you) approach of getting your core message right, and then layering enhancements on top, and that form and function are related and just because we say “separate style from content” doesn’t mean what you do in HTML has no bearing on how things look… anyway - that’s his rant. I’ve been known to rant on the same topic.
To quote his quote “If you don’t know six ways to abuse a tool then you don’t know how to use it”. I like!
more links
New York Public Library online style guide
Jeffrey Zeldman CSS Lectures
Anway, I wanted a “Clean Start” === “No CSS Hacks” (aka To Hell With Bad Browsers).
So, here’s a basic #header, left #menu, .content, fluid layout, absolute position menu, *no* CSS hacks and no appologies :). I’ll demo this somewhere soon…
body {
margin: 0px;
padding: 0px;
}
h1 {
margin: 0px;
padding: 0px;
}
#header {
margin: 0px 0px 10px 0px;
padding: 0.5em 0px 0px 2em;
border: 1px solid black;
background-color: #eee;
}
.content {
margin: 0em 2em 2em 12em;
padding: 1em;
border: 1px solid blue;
}
#menu {
position: absolute;
top: 5em;
left: 1em;
width: 10em;
padding: 0;
border: 1px dashed #999;
}
[edit:I’m missing html code because of the recent blog conversion that isn’t quite so automagic… so i’ll just do a new version of a css layout reference some time soon instead]
Visual prop’s would help i know, but …
Permalink
07.27.05
Posted in web dev at 2:48 pm by Clinton
At wikipedia there is a very nice page explaining the origin (MS) and current standards (link tags with rel=”shortcut icon” or rel=”icon”), including the fact the ico format has now been registered by microsoft with IANA so it now has a valid MIME type.
The wikipedia links had some links of interest, but not what i wanted - a simple ico conversion program. Nothing fancy. Google - bingo! … and its a good one.
png2ico eh? by Matthias Benkmann (2002) hmm…
http://www.winterdrache.de/freeware/png2ico/
I downloaded the “windows package” (aka zip file) that had the compiled program and a few docs. Didn’t read the notes… just gave it a burl.
c:\>temp\png2ico favicon.ico mynewicon.png
Works just like the box says. There are other web based icon programs out there, and GUI’s for this one I know, but I like this one just fine at the command line.
It’s a simple program, does one task, and does it well. Just what i wanted.
Permalink
· Next entries »