Skip to content

Instantly share code, notes, and snippets.

Ricardo Rossi ricardo-rossi

Block or report user

Report or block ricardo-rossi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View chart.cljs
(ns om-data-vis.chart
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [om.core :as om :include-macros true]
[cljs.core.async :refer [<! chan put! sliding-buffer]]
[ajax.core :refer (GET)]
[sablono.core :as html :refer-macros [html]]))
(defn- draw-chart [cursor {:keys [div bounds x-axis y-axis plot]}]
(let [{:keys [id width height]} div
Chart (.-chart js/dimple)
View routing.cljs
defresource contact [handlers]
:allowed-methods #{:delete :put}
:available-media-types #{"application/json"}
:handle-ok (fn [{{{id :id} :route-params routes :routes} :request}]
(assert (realized? handlers))
(html [:div [:h2 "Contact: " id]
[:a {:href (path-for routes (:contacts @handlers))} "Index"]])))
(defn make-handlers [database]
(let [p (promise)]
ricardo-rossi / typeahead.cljs
Created Apr 18, 2017
ReactJS Component for type ahead
View typeahead.cljs
(defn typeahead [data owner]
(init-state [_] {:text ""})
(render-state [_ {:keys [text]}]
(let [words (:words data)]
(dom/div nil
(dom/h2 nil "Tag")
ricardo-rossi /
Created Dec 21, 2015 — forked from patrickarlt/
ES 7 async/await demo!
babel github-es6.js -o github.js --optional runtime --experimental
ricardo-rossi /
Last active Feb 8, 2018 — forked from ervinb/
Install Maven 3.3.3 on Ubuntu 14.04
sudo apt-get purge -y maven
if ! [ -e apache-maven-3.3.3-bin.tar.gz ]; then (curl -OL; fi
sudo tar -zxf apache-maven-3.3.3-bin.tar.gz -C /usr/local/
sudo ln -s /usr/local/apache-maven-3.3.3/bin/mvn /usr/bin/mvn
echo "Maven is on version `mvn -v`"
View gist:fd15902864d47696b9d5
while true;
git log \
--graph \
--all \
--color \
--date=short \
-40 \
View Nutrient.php
class Nutrient extends BaseModel {
protected $guarded = array();
public static $rules = array(
'name' => 'required',
'unit' => 'required'
View IngredientTypesController.php
class IngredientTypesController extends BaseController {
* Ingredient Types Repository
* @var IngredientType
protected $type;
ricardo-rossi / MailingList.php
Created Sep 18, 2014
This class handles adding new users our MailChimp mailing list as well as updating the list entry based on actions
View MailingList.php
<?php namespace Endata\Lists;
use MailChimp;
use Carbon\Carbon;
class MailingList {
protected $mailchimp;
protected $list_id = 'MCIDXXX'; // The MailChimp list id
ricardo-rossi / SampleLoader.php
Created Sep 18, 2014
Loads sample data into database
View SampleLoader.php
<?php namespace Endata\Data;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\File;
use Ingredient;
use Nutrient;
use Composition;
use Settings;
use Plant;
use Formula;
You can’t perform that action at this time.