This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
def to_deep_sorted_json(obj) | |
if obj.instance_of?(Array) | |
return '[' + obj.map{|o|to_deep_sorted_json(o)}.join(',') + ']' | |
end | |
if obj.instance_of?(Hash) | |
keys = obj.keys.sort | |
return '{' + keys.map{|k| JSON.generate(k) + ':' + to_deep_sorted_json(obj[k])}.join(',') + '}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActiveAdmin | |
module Filters | |
module FormtasticAddons | |
alias :old_seems_searchable? :seems_searchable? | |
def seems_searchable? | |
return false if ransacker? | |
old_seems_searchable? | |
end | |
def klass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# For each ref, validate the commit. | |
# | |
# - It disallows deleting branches without a /. | |
# - It disallows non fast-forward on branches without a /. | |
# - It disallows deleting tags without a /. | |
# - It disallows unannotated tags to be pushed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'watir-webdriver' | |
require 'openssl' | |
require 'open-uri' | |
require 'nokogiri' | |
# bad pinterest, having a bad cert | |
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE |