Skip to content

Instantly share code, notes, and snippets.

View wilkerlucio's full-sized avatar

Wilker Lúcio wilkerlucio

View GitHub Profile
@wilkerlucio
wilkerlucio / webrat_steps_br.rb
Created January 18, 2010 05:19
cucumber pt-br websteps
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
# Commonly used webrat steps
(ns common-spec.coerce
(:refer-clojure :exclude [def])
(:require [clojure.spec.alpha :as s]
[clojure.walk :as walk])
(:import (java.util UUID)))
(s/def ::coerce-fn
(s/fspec :args (s/cat :x string?) :ret any?))
(defonce ^:private registry-ref (atom {}))
(om/defui ^:once QueuedVideo
static uc/InitialAppState
(initial-state [_ title] {::video/id (random-uuid)
::video/title title})
static om/IQuery
(query [_] [::video/id
::video/watched?
{::video/snippet
[::video/title
(om/defui ^:once QueuedVideo
static uc/InitialAppState
(initial-state [_ title] {::video/id (random-uuid)
::video/title title})
static om/IQuery
(query [_] [::video/id
::video/watched?
{::video/snippet
[::video/title
(ns ygq.background.main
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs.core.async :as async :refer [<!]]
[chrome.rpc :as rpc]
[ygq.background.parser :as p]
[google.api :as g]))
(defonce comm-listener
(go
(let [rpc (rpc/listen (async/chan 10))
(ns ygq.popup.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [untangled.client.core :as uc]
[cljs.core.async :as async :refer [<!]]
[chrome.rpc :as rpc]
[google.api :refer [get-auth-token]]
[untangled.client.network :as un]))
(defrecord Network [complete-app]
un/NetworkBehavior
@wilkerlucio
wilkerlucio / specter-walk-keys.clj
Last active June 2, 2017 14:28
Specter - walk map keys
(def data
{:person/name "Bla"
:person/child {:child/something "other"
:child/bla {:subchild/entry "blabla"}}})
(def MapWalker
(sp/recursive-path [] p
(sp/if-path map?
(sp/continue-then-stay sp/MAP-VALS p))))
(om/defui ^:once BasicChannelView
static om/IQuery
(query [_] [:channel/id {:channel/snippet [:channel/title]}]))
(om/defui ^:once ComplexChannelView
static om/IQuery
(query [_] [:channel/id
{:channel/snippet
[:channel/title
{:channel/thumbnails
[{[:video/by-id "XHGKIzCcVa0"]
[{:video/snippet
[:video/title
:video/description
:video/published-at
{:video/channel
[{:channel/snippet
[:channel/title
{:channel/thumbnails
[org.clojure/clojure "1.9.0-alpha14"]
[org.clojure/clojurescript "1.9.494"]
[org.omcljs/om "1.0.0-alpha48"]
[clj-http "3.4.1"]
[cheshire "5.7.0"]
[camel-snake-kebab "0.4.0"]