Skip to content

Instantly share code, notes, and snippets.

@wesleyhales
wesleyhales / common.css
Created April 7, 2012 22:54
common.css
.clearlink {
background: url(images/close-button.png) no-repeat scroll 0 0 transparent;
background-position: center center;
cursor: pointer;
/*zoom: 1;*/
position: absolute;
right: 0.25em;
top: 50%;
margin: 1px;
height: 12px;
@wesleyhales
wesleyhales / LinkedList.js
Created March 12, 2012 19:02
JavaScript LinkedList Example
//I wanted a more elegant linkedlist example than the others, so purely for academic purposes I created one.
var LinkedList = function(e){
var that = {}, first, last;
that.push = function(value){
var node = new Node(value);
if(first == null){
first = last = node;
@wesleyhales
wesleyhales / gist:1901427
Created February 24, 2012 14:52
settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
@wesleyhales
wesleyhales / ChatServerServletContextListener.java
Created January 21, 2012 03:16
Blog: CDI Event Based Development with WebSockets and JBoss AS7
private Server server = null;
/**
* Start Embedding Jetty server when WEB Application is started.
*
*/
public void contextInitialized(ServletContextEvent event) {
try {
// 1) Create a Jetty server with the 8081 port.
InetAddress addr = InetAddress.getLocalHost();
this.server = new Server();