I hereby claim:
- I am dleavitt on github.
- I am dleavitt (https://keybase.io/dleavitt) on keybase.
- I have a public key whose fingerprint is 1C14 D5B4 4BB7 B2DC 56DE 4734 26FF 959C 0213 8EAD
To claim this, I am signing this object:
{ | |
"title": "JSON schema for RuboCop configuration files", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"require": { | |
"$ref": "#/definitions/stringOrStrings" | |
}, | |
"inherit_from": { | |
"$ref": "#/definitions/stringOrStrings" |
{ | |
"title": "JSON schema for RuboCop configuration files", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"require": { | |
"$ref": "#/definitions/stringOrStrings" | |
}, | |
"inherit_from": { | |
"$ref": "#/definitions/stringOrStrings" |
I hereby claim:
To claim this, I am signing this object:
<html> | |
<head> | |
<style type="text/css"> | |
body { | |
margin: 0; | |
} | |
img { | |
cursor: pointer; | |
} | |
.back { |
import Alt from 'alt'; | |
let alt = new Alt(); | |
class AnimalActions { | |
run() { | |
// do some stuff | |
this.dispatch(); | |
} | |
} |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
CSV_SETTINGS = { | |
headers: true, # first row is headers | |
header_converters: :symbol, # convert headers to symbols | |
converters: [ | |
-> (f) { f.present? ? f : nil }, # convert empty cells to nil | |
-> (f) { f.respond_to?(:gsub) ? f.gsub(/\s+$/, '') : f }, # convert whitespace to nil | |
:all # converts things to numbers and dates | |
] | |
} |
%x{git branch | grep feature}.split("\n").map(&:strip).map {|o| [o, o.gsub(/^feature\//, "old/")] }.map {|(o, n)| %x{git branch -m #{o} #{n}} } |
module CarrierWave | |
module MiniMagick | |
module ImageProcessors | |
def store_dimensions(property_name) | |
# TODO: deal with default version | |
image = ::MiniMagick::Image.open(current_path) | |
model.send("#{property_name}=", {}) unless model.send(property_name) | |
ver = (version_name || "original").to_s | |
model.send(property_name)[ver] = image["dimensions"] | |
end |
desc "Outputs a change log based on git tags" | |
task :changelog do | |
tags = Dir['.git/refs/tags/*'].each.with_object({}) do |path, hsh| | |
hsh[File.basename(path)] = File.read(path).chomp | |
end | |
tag_outputs = [] | |
tags.reduce(nil) do |(_, commit1), (name, commit2)| | |
tag_date = `git log -1 --format="%ci" #{commit2}`.chomp | |
lines = [ "## #{name} - #{tag_date}\n" ] |