Skip to content

Instantly share code, notes, and snippets.

@marianoguerra
marianoguerra / om-next-with-specter.cljs
Last active October 13, 2015 15:25
First attempt at using specter with om.next, the mutate function is quite hacky since I'm sending all the info in the params and ignoring te query
(ns iorioui.core
(:require
[goog.dom :as gdom]
[om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[com.rpl.specter :as s]
[cljs-http.client :as http]
[cljs.core.async :refer [<! >! put! chan]])
(:require-macros
[cljs.core.async.macros :refer [go]]))
@marianoguerra
marianoguerra / on-next-with-datascript.cljs
Created October 19, 2015 12:54
example of using on-next with datascript, trying to understand component composition and queries
(ns iorioui.core
(:require
[goog.dom :as gdom]
[om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[com.rpl.specter :as s]
[datascript.core :as d]
[cljs-http.client :as http]
[cljs.core.async :refer [<! >! put! chan]])
(:require-macros
@marianoguerra
marianoguerra / rebar.config
Created February 22, 2016 17:56
rebar3_cuttlefish problems
{erl_opts, [debug_info, {parse_transform, lager_transform}]}.
{deps, [
{pbkdf2, {git, "git://github.com/marianoguerra/erlang-pbkdf2-no-history", {branch, "master"}}},
{exometer_core, {git, "git://github.com/basho/exometer_core.git", {branch, "th/correct-dependencies"}}},
{riak_core, {git, "git://github.com/basho/riak_core", {branch, "develop"}}}
]}.
{relx, [{release, { ricor , "0.1.0"},
[ricor,
@marianoguerra
marianoguerra / README.rst
Last active April 1, 2024 15:25
MQTT Generator Script

MQTT Generator

A simple python 3 script to generate sensor data from a config file and send it to an MQTT broker.

Usage

Download mqttgen.py and config.json files (click on the Raw button at the top right and then save the content), edit config.json to fit your needs, if you are using it to run the Event Fabric sensors dashboard then don't change the topic in config.json unless you want to change it in the dashboard too.

when setting {include_src, false} on relx section on rebar.config and running:

rebar3 release

sources are included

when doing rebar3 as prod release

they are not

@marianoguerra
marianoguerra / queue.txt
Created May 19, 2016 20:40
Paper Queue as of 19-05-2016
10-Deadlock Avoidance for Streaming Computations with Filtering.pdf
10-EventScript: An Event-Processing Language Based on Regular Expressions with Actions.pdf
10-hancock-language-data-streams.pdf
11-Cayuga A General Purpose Event Monitoring System.pdf
11-Finding Frequent Items in Data Streams.pdf
11-Optimization of Sequence Queries in Database Systems.pdf
12-Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications.pdf
12-Distributed Event Stream Processing with Non-deterministic Finite Automata.pdf
12-High-Performance Complex Event Processing over XML Streams.pdf
12-LSM-trie: An LSM-tree-based Ultra-Large Key-Value Store for Small Data.pdf
@marianoguerra
marianoguerra / README.rst
Last active May 22, 2016 21:42
Easy Way to test Sonic PI build scripts on clean ubuntu 16.10

this is an easy way to test that the scripts to build sonic py on master work, in requires vagrant to be installed:

vagrant init ubuntu/xenial64; vagrant up --provider virtualbox
vagrant ssh -c "git clone https://github.com/samaaron/sonic-pi.git; cd sonic-pi/app/gui/qt; ./build-ubuntu-app"

as it is the script will ask for confirmation to install the packages, you can just hit enter to install them, adding -y to apt-get install would do it automatically but I don't know if it's the intended way.

also it may ask for confirmation to add ssl certs when cloning supercolider.

@marianoguerra
marianoguerra / error.erl
Last active October 9, 2016 19:23 — forked from anonymous/error.erl
Standard Error Format for Erlang
-record(error, {type, ctx}).
% TODO: macros to create error adding module, line and function to context
% TODO: line(#error{}), module(#error{}), function(#error{}) to return those fields if defined or undefined if not
% TODO: pretty printer
new(Type) -> new(Type, #{}).
new(Type, Ctx) -> #error{type=Type, ctx=Ctx}.
@marianoguerra
marianoguerra / README.rst
Last active October 22, 2016 00:18
List of things to compare between current and new doc style
@marianoguerra
marianoguerra / dep-tree.rst
Created March 6, 2017 12:40
React hello world dependencies
$ create-react-app hello-world

Creating a new React app in hello-world.

Installing packages. This might take a couple minutes. Installing react, react-dom, and react-scripts...

: