Skip to content

Instantly share code, notes, and snippets.

#! /bin/sh
#
# jaxer This file is used as an init script for Jaxer. It should saved as
# /etc/init.d/jaxer
#
# To enable, run:
# sudo chmod +x jaxer
# sudo update-rc.d jaxer defaults
# from /etc/init.d
#
# This is a VirtualHost configuration for running Aptana Jaxer 1.0 with an
# existing installation of Apache 2.2 on Ubuntu 8.04 Server (or others.)
#
# Replace the #{...} content with the settings for your site.
# Uncomment this line if this is your only virtual host
# NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@#{example.com}
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Blog In A Browser</title>
<style>
body { font-family: Helvetica, Arial, sans-serif; margin: 0em; }
h1, h2, h3 { font-weight: normal; padding-left: 1em; }
textarea, a { display: block; }
#tabs { float: left; width: 100%; list-style: none; border-bottom: 1px solid; clear: both; }
@smith
smith / vimrc
Created February 9, 2009 03:42
" Nathan L Smith's .vimrc file. Based on
" John Lam's .vimrc file
" Use ruby syntax for capfiles
au BufNewFile,BufRead capfile setf ruby
syntax on
set nocompatible
set autoread
filetype on
@smith
smith / jsonschema.js
Created June 19, 2009 13:56
JSONSchema Validator
/**
* JSONSchema Validator - Validates JavaScript objects using JSON Schemas
* (http://www.json.com/json-schema-proposal/)
*
* Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com)
* Licensed under the MIT (MIT-LICENSE.txt) licence.
To use the validator call JSONSchema.validate with an instance object and an optional schema object.
If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),
that schema will be used to validate and the schema parameter is not necessary (if both exist,
both validations will occur).
<!doctype html>
<html><head>
<script runat="server" src="narwhal/packages/narwhal-jaxer/bootstrap.js"></script>
<script runat="server">
require.paths.push("/opt/narwhal"); // to find "tests"
// for output
system.print = function (s) { document.write(s + "<br />\n"); };
system.stdout.write = system.print;
var t = require("tests/all-tests"),
# Helper to execute blocks of shell commands via capistrano run
def run_chunk(cmd,options={})
run cmd.split("\n").map {|l| l.strip }.join(" "), options
end
# Example
task :revision, :roles => [:app] do
run_chunk %Q{
rm -f #{current_release}/public/REVISION;cp #{current_release}/REVISION #{current_release}/public/REVISION;
cd #{current_release}; git config --list | grep branch\.deploy >> #{current_release}/public/REVISION;
<script runat="server">
var cc = Components.classes,
ci = Components.interfaces;
function w(o) {
for (var i in o) { document.write(i + "<br />"); }
}
document.write("-- Components.classes -- <br />");
w(cc);
diff --git a/src/tabs.js b/src/tabs.js
index 7efbe24..133c1b8 100644
--- a/src/tabs.js
+++ b/src/tabs.js
@@ -83,10 +83,8 @@ Control.Tabs = Class.create({
throw "Control.Tabs: #" + link.key + " was not found on the page."; }
this.containers.set(link.key,container);
link[this.options.hover ? 'onmouseover' : 'onclick'] = function(link){
- if(window.event) {
- Event.stop(window.event); }
diff --git a/src/tabs.js b/src/tabs.js
index 7efbe24..fbbb5c9 100644
--- a/src/tabs.js
+++ b/src/tabs.js
@@ -44,6 +44,8 @@ Control.Tabs = Class.create({
return (/^#/).exec((Prototype.Browser.WebKit ? decodeURIComponent(link.href) : link.href).replace(window.location.href.split('#')[0],''));
}).each(function(link){
this.addTab(link);
+ link.writeAttribute("href",null);
+ link.setStyle({cursor:'pointer'});