Skip to content

Instantly share code, notes, and snippets.

" genera editing options
set nocompatible
set tabstop=4
set expandtab
set paste
set nowrap
set autoindent
syntax on
filetype plugin indent on
; 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",
## 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();
sub get_current_word {
return VIM::Eval('expand("<cword>")');
}
sub get_current_line {
my ($row, $col) = $curwin->Cursor();
return $curbuf->Get($row);
}
while getopts "s:r:f:" Option;
do
case $Option in
s)
search=$OPTARG
;;
r)
replace=$OPTARG
;;
f)
-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)])
-module (web_postback_test).
-include_lib ("nitrogen/include/wf.inc").
-compile(export_all).
main() ->
%TODO(jwall): force identity
#template { file="./wwwroot/api_test.html"}
.
test() ->
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/
*
* Custom erlang SyntaxHighlighterBrush
*/
SyntaxHighlighter.brushes.Erlang = function()
{
// Contributed by David Simmons-Duffin and Marty Kube
-module(string_utils).
-compile(export_all).
flatten_string_list(List) when is_list(List) ->
flatten_string_list(List, []).
flatten_string_list([H|T], Tail) when is_list(H) ->
case io_lib:char_list(H) of
false ->
flatten_string_list(H, flatten_string_list(T, Tail));
-module(element_flot_chart).
-compile(export_all).
-include_lib("nitrogen/include/wf.inc").
-include("elements.hrl").
reflect() -> record_info(fields, flot_chart).
rec() -> #flot_chart{}.