Skip to content

Instantly share code, notes, and snippets.

View daleharvey's full-sized avatar

Dale Harvey daleharvey

View GitHub Profile
module(elementcount).
export([elementcount/2]).
elementcount(Key, List) ->
lists:foldl(fun(X, Acc) ->
case X =:= Key of
%% Recursively copy directories
-spec recursive_copy(list(), list()) -> ok.
recursive_copy(From, To) ->
{ok, Files} = file:list_dir(From),
[ok = rec_copy1(From, To, X) || X <- Files],
ok.
-spec rec_copy(list(), list(), list()) -> ok.
rec_copy(_From, _To, [$. | _T]) -> %% Ignore Hidden
ok;
%% Recursively copy directories
-spec recursive_copy(list(), list()) -> ok.
recursive_copy(From, To) ->
{ok, Files} = file:list_dir(From),
[ok = rec_copy(From, To, X) || X <- Files],
ok.
-spec rec_copy(list(), list(), list()) -> ok.
rec_copy(_From, _To, [$. | _T]) -> %% Ignore Hidden
ok;
-module(hn_shell).
-compile([ export_all ]).
start() ->
Pid = spawn(?MODULE, print, [group_leader()]),
erlang:trace(all, true, [call, {tracer, Pid}]),
erlang:trace_pattern({error_logger, info_msg, '_'}, true, [local]).
print(Leader) ->
#!/bin/sh
node node.imgup.js &
while inotifywait -e modify $(pwd); do
echo "Burn and Die"
killall node
node node.imgup.js &
done
<!DOCTYPE html>
<html>
<head>
<title>Sproingg</title>
<link rel="stylesheet" href="style/main.css" type="text/css">
</head>
<body>
diff --git a/src/couchdb/couch_db.erl b/src/couchdb/couch_db.erl
index 36b61a7..c411ede 100644
--- a/src/couchdb/couch_db.erl
+++ b/src/couchdb/couch_db.erl
@@ -13,7 +13,7 @@
-module(couch_db).
-behaviour(gen_server).
--export([open/2,open_int/2,close/1,create/2,start_compact/1,get_db_info/1,get_design_docs/1]).
+-export([open/2,open/3,open_int/2,close/1,create/2,start_compact/1,get_db_info/1,get_design_docs/1]).
E/GeckoConsole( 106): Content JS INFO at app://system.gaiamobile.org/js/window_manager.js:399 in appendFrame: %%%%% Launching Camera as local
D/memalloc( 106): /dev/pmem: Allocated buffer base:0x4a900000 size:40960 offset:614400 fd:94
D/memalloc( 106): /dev/pmem: Allocated buffer base:0x4a900000 size:40960 offset:655360 fd:113
D/memalloc( 106): /dev/pmem: Allocated buffer base:0x4a900000 size:40960 offset:696320 fd:118
D/memalloc( 106): /dev/pmem: Allocated buffer base:0x4a900000 size:40960 offset:1368064 fd:126
D/memalloc( 106): /dev/pmem: Allocated buffer base:0x4a900000 size:20480 offset:1409024 fd:133
D/memalloc( 106): /dev/pmem: Freeing buffer base:0x4a9aa000 size:40960 offset:696320 fd:118
E/QualcommCamera( 106): Qint android::get_number_of_cameras(): E
I/QualcommCameraHardware( 106): getCameraInfo: IN

Overview

PouchDB is a database written in JavaScript for web browsers that has in built sync capabilities.

For a long time 'web' was synonymous with 'online'. That is no longer the case, Mobile web usage is set to overtake desktop web usage shortly and a growing number of examples are showing that web technology is capable of handling the type of applications that were traditionally built using desktop native technology.

The new wave of offline web applications are going to need somewhere to store their data and they are going to need to learn how to move that data around as their user moves from device to device. How about we build a database with that functionality built in?

Objective

@daleharvey
daleharvey / gist:5182714
Created March 17, 2013 17:46
SXSW Seen
Skaters
Team Spirit
Japandroids
Waves
Blondfire
Neighbourhoods
Ume
Holy Esque
Audacity
Calm Blue Sea