Skip to content

Instantly share code, notes, and snippets.

View danielberkompas's full-sized avatar

Daniel Berkompas danielberkompas

View GitHub Profile
@danielberkompas
danielberkompas / gist:fec3369ae7603d709850
Created August 22, 2014 13:45
Install 1.9.3 with Rails Express Patches
ruby-install -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/01-fix-make-clean.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/02-railsbench-gc.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/03-display-more-detailed-stack-trace.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/04-fork-support-for-gc-logging.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/05-track-live-dataset-size.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/06-webrick_204_304_keep_alive_fix.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/07-export-a-few-more-symbols-for-ruby-prof.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/08-thread-variables.patch -p https://raw.g
@danielberkompas
danielberkompas / wait_for_ajax.rb
Created February 6, 2015 19:12
Race Conditions in Capybara
def wait_for_ajax
Timeout.timeout(Capybara.default_wait_time) do
loop until finished_all_ajax_requests?
end
end
def finished_all_ajax_requests?
page.evaluate_script("jQuery.active").zero?
end

Keybase proof

I hereby claim:

  • I am danielberkompas on github.
  • I am dberkom (https://keybase.io/dberkom) on keybase.
  • I have a public key whose fingerprint is 3231 92F3 2380 DF70 97E9 DB82 A53C DADD 426D 840C

To claim this, I am signing this object:

@danielberkompas
danielberkompas / gist:737b11e3c36e20b0ebe4
Created April 2, 2015 17:20
Generate ctags for YouCompleteMe
ctags -R --fields=+l
@danielberkompas
danielberkompas / .travis.yml
Created April 3, 2015 22:23
Build PLTs on Travis
language: elixir
elixir:
- 1.0.0
- 1.0.1
- 1.0.2
- 1.0.3
otp_release:
- 17.4
- 17.3
- 17.2
p = Project.first
p.update(description: <<CONTENT
Here is a description
More description
CONTENT
@danielberkompas
danielberkompas / phoenix_html.log
Created May 11, 2015 18:54
Upgrading to Phoenix 0.13.0
==> phoenix_html
Compiled lib/phoenix_html/engine.ex
lib/phoenix_html/link.ex:1: warning: redefining module Phoenix.HTML.Link
Compiled lib/phoenix_html.ex
Compiled lib/phoenix_html/link.ex
lib/phoenix_html/tag.ex:1: warning: redefining module Phoenix.HTML.Tag
lib/phoenix_html/form_data.ex:17: warning: redefining module Phoenix.HTML.FormData.Plug.Conn
lib/phoenix_html/safe.ex:1: warning: redefining module Phoenix.HTML.Safe
Compiled lib/phoenix_html/form_data.ex
Compiled lib/phoenix_html/tag.ex
@danielberkompas
danielberkompas / compiling.log
Created May 11, 2015 19:02
Complete backtrace of mix deps.get, deps.compile
on_sale [upgrade-phoenix-13●] rm -rf deps
on_sale [upgrade-phoenix-13●] git s
M mix.exs
M mix.lock
on_sale [upgrade-phoenix-13●] mix deps.get
Running dependency resolution
Dependency resolution completed successfully
* Getting phoenix (Hex package)
Checking package (https://s3.amazonaws.com/s3.hex.pm/tarballs/phoenix-0.13.0.tar)
Using locally cached package
@danielberkompas
danielberkompas / date_time_marshaller.rb
Created May 21, 2015 18:42
DateTime marshaler for attr_encrypted
require "attr_encrypted"
require "active_support/core_ext/date_time"
module DateTimeMarshaler
FORMAT = "%F %H:%M:%S"
def self.dump(datetime)
datetime.strftime(FORMAT)
end
@danielberkompas
danielberkompas / gist:3185576
Created July 27, 2012 01:13
A sample interactor for Jamon
# app/interactors/admin/automated_tasks.rb
class Admin::AutomatedTasks
def self.run
Oem.all.each do |oem|
Admin::SendOemDataDump.run(oem)
end
end
end
# app/interactors/admin/send_oem_data_dump.rb