Skip to content

Instantly share code, notes, and snippets.


Srdjan Pejic batasrki

View GitHub Profile
View warning
udio:<flvdemux0> failed pushing a 289 bytes audio buffer: not-linked
0:01:02.593179039 2738 0xb35630 WARN flvdemux gstflvdemux.c:1185:gst_flv_demux_parse_tag_audio:<flvdemux0> failed pushing a 263 bytes audio buffer: not-linked
0:01:02.626633307 2738 0xb35630 WARN flvdemux gstflvdemux.c:1185:gst_flv_demux_parse_tag_audio:<flvdemux0> failed pushing a 269 bytes audio buffer: not-linked
batasrki / also_works_not.json
Last active Dec 20, 2015
Mandrill API brokenness
View also_works_not.json
"template_name": "verification",
"template_content": null,
"merge_vars": [
"vars": [
"name": "name",
"content": "Test Me"
batasrki / cli
Created Jun 21, 2013
Starting Nailgun breaks if JRUBY_OPTS is set
View cli
# in .zshrc, I got the following
export JRUBY_OPTS=--1.9
→ jruby --ng-server
Exception in thread "main" --1.9: nodename nor servname provided, or not known
at Method)
batasrki / Gemfile
Last active Dec 18, 2015
Gemfile and Gemfile.lock
View Gemfile
ruby '1.9.3', :engine => 'jruby', :engine_version => '1.7.3'
source ''
gem 'rails', '3.2.13'
gem 'rails-api'
gem 'active_model_serializers'
gem 'activerecord-jdbcpostgresql-adapter', '~>1.3.0.beta2'
gem 'puma'
batasrki / stack-trace
Last active Dec 18, 2015
Stack trace
View stack-trace
NotImplementedError: kill unsupported or native support failed to load
kill at org/jruby/
kill at org/jruby/
stop at /opt/boxen/rbenv/versions/jruby-1.7.3/lib/ruby/gems/shared/gems/rb-fsevent-0.9.3/lib/rb-fsevent/fsevent.rb:53
stop at /opt/boxen/rbenv/versions/jruby-1.7.3/lib/ruby/gems/shared/gems/listen-1.2.2/lib/listen/adapter.rb:122
works? at /opt/boxen/rbenv/versions/jruby-1.7.3/lib/ruby/gems/shared/gems/listen-1.2.2/lib/listen/adapter.rb:238
usable_and_works? at /opt/boxen/rbenv/versions/jruby-1.7.3/lib/ruby/gems/shared/gems/listen-1.2.2/lib/listen/adapter.rb:190
all? at org/jruby/
usable_and_works? at /opt/boxen/rbenv/versions/jruby-1.7.3/lib/ruby/gems/shared/gems/listen-1.2.2/lib/listen/adapter.rb:190
__send__ at org/jruby/
batasrki / Vagrantfile.rb
Created May 23, 2013
Forward porting in vagrant
View Vagrantfile.rb
Vagrant.configure("2") do |cluster|
(1..NODES).each do |node_number|
cluster.vm.define "node#{node_number}".to_sym do |config| :private_network, ip: "33.33.33.#{node_number}" :forwarded_port, guest: 8098, host: "809#{node_number}".to_i
batasrki / gist:1670983
Created Jan 24, 2012 — forked from wmoxam/gist:1569088
Ubuntu Way of managing Rubies
View gist:1670983
# Installs Ruby, makes 1.9.2 the default.
sudo aptitude install ruby rubygems ri ruby1.9.1 ri1.9.1 jruby
sudo update-alternatives --remove-all gem
sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.8 300 \
--slave /usr/share/man/man1/ruby.1.gz ruby.1.gz \
/usr/share/man/man1/ruby1.8.1.gz \
View Gemfile
source :rubygems
path '/Users/bkerley/Documents/ripple' do
gem 'riak-client'
gem 'ripple'
View possibly_evil.rb
describe Something do
before do
@mock_view = mock("rails view")
proc_thing = @mock_view.stub(:content_tag).with(:span).and_return("<span></span>")
it "should return a span inside a div" do match /\<div\>\<span\>\<\\span\>\<\\div\>/
View json_builder.rb
# This is a JSON building library. It allows you to build data structures
# to dump as JSON. Here is a sample of how to use it:
# def person_hash(person)
# {
# 'name' =>,
# 'age' => person.age,
# 'friends' => { |x| person_hash x }
# }