Skip to content

Instantly share code, notes, and snippets.

Kevin Bouwkamp bmxpert1

Block or report user

Report or block bmxpert1

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
We couldn’t find that file to show.
View ko_selectize.js
var inject_binding = function (allBindings, key, value) {
return {
has: function (bindingKey) {
return (bindingKey == key) || allBindings.has(bindingKey);
get: function (bindingKey) {
var binding = allBindings.get(bindingKey);
if (bindingKey == key) {
binding = binding ? [].concat(binding, value) : value;
bmxpert1 / foreigner_ext.rb
Last active Dec 25, 2015
Foreigner methods to create and remove foreign keys for cross schema use in PostgreSQL
View foreigner_ext.rb
ActiveRecord::Migration.class_eval do
def add_foreign_key_ignore_prefix(from_table, to_table, options = {})
table_name_prefix = ActiveRecord::Base.table_name_prefix
ActiveRecord::Base.table_name_prefix = ''
add_foreign_key(from_table, to_table, options)
ActiveRecord::Base.table_name_prefix = table_name_prefix
def remove_foreign_key(from_table, options = {})
table_name_prefix = ActiveRecord::Base.table_name_prefix
bmxpert1 / admin_controller.rb
Created Jun 19, 2013
Rails browser based log file tail-er
View admin_controller.rb
class AdminController < ApplicationController
layout 'admin'
def logs
log = File.join(Rails.root, "log", "#{Rails.env}.log")
@lines = `tail -1024 #{log}`.split(/\n/)
You can’t perform that action at this time.