Skip to content

Instantly share code, notes, and snippets.

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- 1. -->
<groupId>com.example</groupId>
<artifactId>my-library</artifactId>
@ryanflorence
ryanflorence / static_server.js
Last active July 21, 2024 12:43
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@joelnet
joelnet / example.html
Created June 3, 2011 18:03
Unobtrusive Knockout support library for jQuery
Choose a ticket class: <select id="tickets"></select>
<p id="ticketOutput"></p>
<script id="ticketTemplate" type="text/x-jquery-tmpl">
{{if chosenTicket}}
You have chosen <b>${ chosenTicket().name }</b>
($${ chosenTicket().price })
<button data-bind="click: resetTicket">Clear</button>
{{/if}}
@r-moeritz
r-moeritz / hello.clj
Created June 16, 2011 19:09
hello jwt in clojure : hello.clj
(ns jwt-examples.hello)
(defmacro create-listener [args & body]
(let [argsnum (if (< 0 (count args)) (count args) "") ]
`(proxy [ ~(symbol (str "Signal" argsnum "$Listener")) ] [] (trigger ~args ~@body))))
(import [eu.webtoolkit.jwt WObject Signal WApplication WBreak WtServlet
WEnvironment WLineEdit WPushButton WText Signal$Listener Signal1
EventSignal WWidget Side]
[java.util EnumSet])
@drewbourne
drewbourne / CreateMockolatesManually.as
Created June 21, 2011 03:30
Mockolate FlexUnit Setup Examples
package example
{
import flash.events.Event;
import mockolate.mock;
import mockolate.nice;
import mockolate.prepare;
import org.flexunit.assertThat;
import org.flexunit.async.Async;
@ryancrum
ryancrum / jquerytest.cljs
Created July 21, 2011 02:24
How to use jQuery from ClojureScript
(ns jquerytest.core)
(def jquery (js* "$"))
(jquery
(fn []
(-> (jquery "div.meat")
(.html "This is a test.")
(.append "<div>Look here!</div>"))))
@gregglind
gregglind / fabfile.py
Created September 9, 2011 16:59
Fabfile for PyMNtos September 2011 Meeting
#!/usr/bin/env python
"""
Example fabfile for PyMNtos September 2011 meeting.
some examples of usage:
$ fab -H somehost -- uname -a
$ fab -H somehost run:'uname -a'
$ fab -d example
@daveray
daveray / seesaw-repl-tutorial.clj
Created December 7, 2011 04:55
Seesaw REPL Tutorial
; A REPL-based, annotated Seesaw tutorial
; Please visit https://github.com/daveray/seesaw for more info
;
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers
; Seesaw's basic features and philosophy, but only scratches the surface
; of what's available. It only assumes knowledge of Clojure. No Swing or
; Java experience is needed.
;
; This material was first presented in a talk at @CraftsmanGuild in
; Ann Arbor, MI.
@weitzj
weitzj / build.gradle
Created January 9, 2012 00:17
groovy, java, intellij IDEA setup
/**
* Initial build.gradle script to wrap groovy/java scripts into one fat jar file.
* (including some nice tools for scripting: GROOVY, GPARS, LOG4J, ANTBUILDER, CLI-PARSER)
*
* Project Setup via:
* gradle makeDirs
*
*
* IntelliJ IDEA integration:
* gradle idea
@drewbourne
drewbourne / Model.as
Created February 2, 2012 22:35
FlexUnit Parameterized Test with Mockolate
package flexunit.example.parameterized
{
public class Model
{
public function calculate(... args):Number
{
return NaN;
}
}
}