I hereby claim:
- I am brianjlandau on github.
- I am brianjlandau (https://keybase.io/brianjlandau) on keybase.
- I have a public key ASADZdepX0J5-Vj2nmxaby26kkElaVpSHeHAW6n6Hg3j_Qo
To claim this, I am signing this object:
| curl "https://formulae.brew.sh/api/analytics/install-on-request/homebrew-core/90d.json" | \ | |
| jq ".formulae | | |
| to_entries | | |
| sort_by([(.value[].count | gsub(\",\"; \"\") | tonumber)] | add) | | |
| reverse | | |
| map({key: .key, value: ([(.value[].count | gsub(\",\"; \"\") | tonumber)] | add)})[0:500] | | |
| from_entries" | \ | |
| less |
I hereby claim:
To claim this, I am signing this object:
| { | |
| "presets": [ | |
| [ | |
| "env", | |
| { | |
| "modules": false, | |
| "targets": { | |
| "browsers": "> 1%", | |
| "uglify": true | |
| }, |
| #!/usr/bin/env bash | |
| if [ ${#1} -eq 0 ] | |
| then echo "Error: Please supply a URL"; exit 1; | |
| fi | |
| ENCODING_HEADER=$(curl --silent -I $1 -H "Accept-Encoding: gzip,deflate" | tr -d '\r' | sed -En 's/^Content-Encoding: (.+)$/\1/p') | |
| if [ "$ENCODING_HEADER" == "gzip" ] | |
| then echo "GZIP: Enabled" |
| ActiveRecord::Reflection::AbstractReflection.class_eval do | |
| def build_association(*options, &block) | |
| attributes = if options.first.is_a?(Hash) | |
| options.first.with_indifferent_access | |
| end | |
| if attributes && attributes[:type].present? | |
| attributes[:type].constantize.new(*options, &block) | |
| else | |
| klass.new(*options, &block) |
| require 'uri' | |
| class UriValidator < ActiveModel::EachValidator | |
| def validate_each(record, attribute, value) | |
| if value.present? | |
| begin | |
| unless URI(value).is_a?(URI::HTTP) | |
| record.errors.add(attribute, :invalid_uri, options) | |
| end | |
| rescue |
| git log --pretty=%an your/path | awk -F, '{++freq[$1];}END{for (author in freq)printf "%s\t%d\n", author, freq[author];}' |
| RSpec::Matchers.define :be_an_array_of do |expected| | |
| match do |actual| | |
| actual.is_a?(Array) && actual.all?{|item| item.is_a?(expected) } | |
| end | |
| failure_message do |actual| | |
| "expected that #{actual} would be an array #{expected}" | |
| end | |
| end |