Skip to content

Instantly share code, notes, and snippets.

View andre1810's full-sized avatar

André Hester andre1810

View GitHub Profile
@jcieslar
jcieslar / selectize_spec.rb
Created March 19, 2015 16:33
Capybara and selectize
page.execute_script("$('.selectize-input input').val('ber')")
sleep 0.5
page.execute_script("$('.selectize-input input').keyup()")
sleep 0.5
page.execute_script("$('.full-name').mousedown()")
# https://github.com/brianreavis/selectize.js/blob/master/src/selectize.js
@fadhlirahim
fadhlirahim / dirty_associations.rb
Last active January 31, 2024 09:16
Awesome simple solution for Rails ActiveRecord dirty tracking associations
# Credit Brandon Weiss of http://anti-pattern.com/dirty-associations-with-activerecord
# app/models/dirty_associations.rb
module DirtyAssociations
attr_accessor :dirty
attr_accessor :_record_changes
def make_dirty(record)
self.dirty = true
self._record_changes = record
@cedricdekimpe
cedricdekimpe / application.js
Created May 29, 2012 09:27
How-to override window.confirm() dialog with Rails 3 and bootbox.js
//= require bootbox.min
@dakatsuka
dakatsuka / rabbitmq-server.patch
Created April 18, 2012 07:22
Support FQDN NODENAME for RabbitMQ
--- rabbitmq-server 2012-04-18 16:17:39.168100001 +0900
+++ rabbitmq-server 2012-04-18 16:17:13.304100001 +0900
@@ -102,7 +102,7 @@
exec erl \
${RABBITMQ_EBIN_PATH} \
${RABBITMQ_START_RABBIT} \
- -sname ${RABBITMQ_NODENAME} \
+ -name ${RABBITMQ_NODENAME} \
-boot ${RABBITMQ_BOOT_FILE} \
${RABBITMQ_CONFIG_ARG} \