Skip to content

Instantly share code, notes, and snippets.

View yzhanginwa's full-sized avatar

Ethan Zhang yzhanginwa

View GitHub Profile
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
@yzhanginwa
yzhanginwa / git-pre-receive-hook.sh
Created November 17, 2016 15:44 — forked from caniszczyk/git-pre-receive-hook.sh
A reasonable git pre-receive-hook
#!/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.
#! /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