Skip to content

Instantly share code, notes, and snippets.

var setTextMeasure = function (contentElement, targetMeasure, maxSize, minSize) {
if (!contentElement) contentElement = document.createElement('p');
if (!targetMeasure) targetMeasure = 66;
if (!maxSize) maxSize = 16;
if (!minSize) minSize = 9;
var sizer = contentElement.cloneNode();
sizer.style.cssText = 'margin: 0; padding: 0; color: transparent; background-color: transparent; position: absolute;';
var setTextMeasure = function (contentElement, targetMeasure, maxSize, minSize) {
if (!contentElement) contentElement = document.createElement('p');
if (!targetMeasure) targetMeasure = 66;
if (!maxSize) maxSize = 16;
if (!minSize) minSize = 9;
var sizer = contentElement.cloneNode();
sizer.style.cssText = 'margin: 0; padding: 0; color: transparent; background-color: transparent; position: absolute;';
var setTextMeasure = function (contentElement, targetMeasure, maxSize, minSize) {
if (!contentElement) contentElement = document.createElement('p');
if (!targetMeasure) targetMeasure = 66;
if (!maxSize) maxSize = 16;
if (!minSize) minSize = 9;
var sizer = contentElement.cloneNode();
sizer.style.cssText = 'margin: 0; padding: 0; color: transparent; background-color: transparent; position: absolute;';
(ns a)
(use '[clojure.contrib.io :only (make-parents spit delete-file)])
(use '[clojure.contrib.shell :only (sh)])
(use '[clojure.contrib.str-utils :only (re-split str-join)])
(defn- convert-fn-meta-into-javadoc
[impl-ns prefix mname pclasses rclass is-static?]
(let [m (meta (resolve (symbol (str (str impl-ns) "/" prefix (str mname)))))
{:keys [file line doc]} m
1997 Ford E350 ac, abs, moon 3000.00
1999 Chevy Venture "Extended Edition" 4900.00
1999 Chevy Venture "Extended Edition, Very Large" 5000.00
1996 Jeep Grand Cherokee MUST SELL! air, moon roof, loaded 4799.00
(ns a)
(use '[clojure.contrib.io :only (make-parents spit delete-file)])
(use '[clojure.contrib.shell :only (sh)])
(use '[clojure.contrib.str-utils :only (re-split str-join)])
(defn- convert-fn-meta-into-javadoc
[impl-ns prefix mname pclasses rclass is-static?]
(let [m (meta (resolve (symbol (str (str impl-ns) "/" prefix (str mname)))))
{:keys [file line doc]} m
; Copyright (c) Jonas Enlund. All rights reserved.
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
(set! *warn-on-reflection* true)
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",
# my new favorite bashrc function
# quickly inspect source files in style
function pless {
pygmentize $1 | less -r
}
# my new favorite bashrc function
# quickly inspect source files in style
function pless {
pygmentize $1 | less -r
}