Skip to content

Instantly share code, notes, and snippets.

Eduard Bondarenko edbond

  • Kiev, Ukraine
Block or report user

Report or block edbond

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
edbond / arrvsset.rb
Created Mar 29, 2018
Array include vs Set include
View arrvsset.rb
# frozen_string_literal: true
require 'set'
require 'benchmark/ips'
def array_include?
View rails41_jsonb.rb
Rails.application.config.after_initialize do
ActiveSupport.on_load(:active_record) do
oid = ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID
oid::Jsonb = do
def type
View spyke.rb
class JSONParser < Faraday::Response::Middleware
def parse(body)
json = MultiJson.load(body, symbolize_keys: true)
data: json[:result],
metadata: json[:extra],
errors: json[:errors]
edbond /
Last active Sep 9, 2018
external JS with react-native, clojurescript and re-natal
View transit vs json vs edn
Ξ transit/transit-cljs → node target/transit.bench.js
100 iters, JSON.parse seattle data
"Elapsed time: 81.000000 msecs"
100 iters, transit read seattle data
"Elapsed time: 105.000000 msecs"
100 iters, JSON.stringify seattle data
"Elapsed time: 44.000000 msecs"
100 iters, transit write seattle data
"Elapsed time: 1204.000000 msecs"
100 iters, transit write seattle data no-cache
View screenshots.clj
(defn make-screenshots-xf []
(fn [xf]
(let [_ (debug "Starting new browser")
browser (new-driver {:browser :chrome})]
(debug "New browser Maximize")
(maximize browser)
(debug "Init")
edbond / relax.clj
Created Oct 29, 2015
Download youtube mp3 from playlists on site
View relax.clj
(ns relaxfm.core
(:require [hickory.core :as hc]
[ :as hs]
[clj-http.client :as http]
[clojure.string :as s]
[ :as sh]
[clj-time.core :as t]
[clj-time.format :as tf]
[clj-time.coerce :as tc]))
edbond / comment.cljs
Created Aug 29, 2015
Render React component from Om
View comment.cljs
(ns nhchat.components.comment
(:require [om.core :as om]
[om-tools.core :refer-macros [defcomponent]]
[sablono.core :refer-macros (html)]))
(defcomponent wrapper [{:keys [comment]} owner]
(render [_]
(html [:div]))
edbond / int_str.clj
Created Apr 17, 2015
int to "localized" string in ClojureScript
View int_str.clj
(def i 343224324234)
(defn int->str-1
(let [s (str i) p (mod (count s) 3)]
(fn [acc i c]
(if (and (> i 0) (zero? (mod (- i p) 3)))
(conj acc \, c)
View kittens.clj
(ns kittens.core
(:require [environ.core :refer (env)]
[clj-http.client :as http]
[ :as io]
[clojure.core.async :as async :refer (go go-loop <!)]))
(def api-key (-> env :dev :flickr :api-key))
(def rest-api-url "")
(def folder "photos")
You can’t perform that action at this time.