Skip to content

Instantly share code, notes, and snippets.

Yi Zhang yzhanginwa

Block or report user

Report or block yzhanginwa

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
View active_admin_active_resource.rb
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 Nov 17, 2016 — forked from caniszczyk/git-pre-receive-hook.sh
A reasonable git pre-receive-hook
View git-pre-receive-hook.sh
#!/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.
View pinterest-watir.rb
#! /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
You can’t perform that action at this time.