This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(action_api). | |
-include_lib("nitrogen/include/wf.inc"). | |
-include("elements.hrl"). | |
-compile(export_all). | |
render_action(TriggerPath, TargetPath, Record) -> | |
DropBoxId = wf:temp_id() | |
, wf:insert_bottom(body, #hidden{id=DropBoxId, text=""}) | |
, io:format("~p~n", [get(wf_update_queue)]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while getopts "s:r:f:" Option; | |
do | |
case $Option in | |
s) | |
search=$OPTARG | |
;; | |
r) | |
replace=$OPTARG | |
;; | |
f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub get_current_word { | |
return VIM::Eval('expand("<cword>")'); | |
} | |
sub get_current_line { | |
my ($row, $col) = $curwin->Cursor(); | |
return $curbuf->Get($row); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## script to use the hubble json api to download images to your harddrive. | |
## modify to suit. | |
use JSON; | |
use IO::Pipe; | |
use IO::File; | |
my $hubble_data; | |
my $pipe = IO::Pipe->new(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Copyright (c) Jeremy Wall. All rights reserved. | |
; This software is available under the terms of the | |
; Artistic License 2.0 | |
; (http://www.opensource.org/licenses/artistic-license-2.0.php) | |
; 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. | |
(ns | |
#^{:doc "TAP - Test Anything Protocol Testing framework", | |
:author "Jeremy Wall", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" genera editing options | |
set nocompatible | |
set tabstop=4 | |
set expandtab | |
set paste | |
set nowrap | |
set autoindent | |
syntax on | |
filetype plugin indent on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use Mac::Growl qw{:all}; | |
use Getopt::Long; | |
=pod | |
Put this script in a your $PATH and set it to be executable. | |
=cut | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Layout | |
import XMonad.Layout.Column | |
import XMonad.Layout.LayoutBuilder | |
import XMonad.Config.Desktop | |
import XMonad.Util.EZConfig | |
import XMonad.Util.Run(spawnPipe) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn distinctp | |
"Returns a lazy sequence of the elements of coll with duplicates removed" | |
[pred coll] | |
(let [step (fn step [xs seen] | |
(lazy-seq | |
((fn [[f :as xs] seen] | |
(when-let [s (seq xs)] | |
(if (contains? seen (pred f)) | |
(recur (rest s) seen) | |
(cons f (step (rest s) (conj seen (pred f))))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; minihttpd, tiny barebones clojure web server | |
; http://alan.xen.prgmr.com/ | |
(ns alandipert.minihttpd | |
(:use [clojure.contrib.duck-streams :only (reader writer read-lines spit to-byte-array)] | |
[clojure.contrib.str-utils :only (re-split str-join re-gsub)]) | |
(:import (java.net ServerSocket URLDecoder) | |
(java.io File))) | |
(def codes {200 "HTTP/1.0 200 OK" |