Skip to content

Instantly share code, notes, and snippets.

View KirinDave's full-sized avatar

Dave Fayram KirinDave

View GitHub Profile
validate_tables: function() {
// Sometimes you can have as much fun indoors as outdoors.
var self = this;
var found = 0; var needed = this.tables.length; var reported = 0;
var callback = function(present) {
if(present) {
found += 1;
}
reported += 1;
if(reported == needed) {
(define-action (index)
`(html ,(html-header "Account")
(body
(h4 "Note that this action needs to reflect that a user is logged in.")
(a ([href "/account/login"]) "Login") (br)
(a ([href "/account/signup"]) "Signup"))))
(define-action (response formp1 formp2)
(dispatch/c
`(html ,(html-header "Account")
%% ``The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved via the world wide web at http://www.erlang.org/.
%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
<html>
<head>
<title>Test</title>
<style>
.popup {
border: double 3px #000000;
font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
display: none;
position: absolute;
<html>
<head>
<title>Welcome to Oatmeal Homeland!</title>
<meta name="description" content="">
<meta name="keywords" content="Private server, WoW, World of Warcraft">
<STYLE>
:link {color: #666633; font-weight: normal;}
makeSearchCommand({
name: "Powerset",
url: "http://www.powerset.com/explore/go/{QUERY}",
icon: "http://www.powerset.com/favicon.ico",
description: "Searches Powerset for your words.",
preview: function(p, txt) {
p.innerHTML = "Searches powerset for: <i>" + txt.text + "</i>"
}
});
// ==UserScript==
// @name gaia-c-t-userscript
// @namespace http://github.com/linuxfood/gaia-c-t-userscript/
// @description A greasemonkey script adding a whole mess 'o features to GaiaOnline, C&T
// @include http://www.gaiaonline.com/forum/c-t-tech-talk/*
// ==/UserScript==
/* ========================================
Key vars
======================================== */
%% ``The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved via the world wide web at http://www.erlang.org/.
%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
%% ``The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved via the world wide web at http://www.erlang.org/.
%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
(define (permute terms)
(permute-help terms (length terms)))
(define (permute-help terms descent)
(cond
((= (length terms) 1) (list terms))
((< descent 1) (list))
(else (append
(map (lambda (x) (cons (car terms) x)) (permute-help (cdr terms) (length (cdr terms))))
(permute-help (append (cdr terms) (list (car terms))) (- descent 1))))))