I hereby claim:
- I am varyform on github.
- I am varyform (https://keybase.io/varyform) on keybase.
- I have a public key ASBmTI-kjeMgaHsbQGMwHclPhC7mSW6OEkBKy0RVeGk9Xgo
To claim this, I am signing this object:
# config/initializers/public_importmap.rb | |
Rails.application.config.public_importmap = Importmap::Map.new | |
Rails.application.config.public_importmap.draw(Rails.root.join("config/public_importmap.rb")) | |
# app/helpers/application_helper.rb | |
# copied from importmaps replacing javascript_inline_importmap_tag | |
# | |
# !!! No longer needed after this change https://github.com/rails/importmap-rails/pull/187 | |
# | |
# def javascript_public_importmap_tags(entry_point = "application", shim: true) |
fish = Hash.new(0).merge(DATA.read.chomp.split(',').map(&:to_i).tally) | |
256.times do | |
-1.upto(8) { |day| fish[day] = fish[day + 1] } | |
born = fish.delete(-1) | |
fish[8] += born | |
fish[6] += born | |
end |
wins = [ | |
# rows | |
0b000000111, | |
0b000111000, | |
0b111000000, | |
# cols | |
0b100100100, | |
0b010010010, | |
0b001001001, | |
# diags |
I hereby claim:
To claim this, I am signing this object:
task :register_statistics do | |
require 'rails/code_statistics' | |
STATS_DIRECTORIES << ['Services', 'app/services'] | |
STATS_DIRECTORIES << ['Services Tests', 'test/services'] | |
CodeStatistics::TEST_TYPES << 'Services Tests' | |
end | |
Rake::Task['stats'].enhance [:register_statistics] |
require 'color' | |
require 'digest/md5' | |
def generate(extension) | |
color = Digest::MD5.hexdigest(extension)[0..5] | |
hsl = Color::RGB.from_html(color).to_hsl | |
hue = hsl.hue / 360.0 | |
sat = 0.52 | |
lit = hsl.lightness / 100 |
// usage: | |
// .file-extension | |
// %span TXT | |
body { | |
background: #f0f0f0; | |
padding: 2em; | |
} | |
.file-extension { |
### | |
# DO YOU HEAR THE PEOPLE SING? (Uplifting Mix) | |
# version 1.3 (clearer kick sound) | |
# | |
# Converted from CoffeeScript | |
# Source: https://gist.github.com/11080149 | |
# Usage: coffee -bcp file.coffee | |
# | |
# Original from Les Miserables |
# Fibonacci numbers WITH memoization. | |
# Initialize the memoization array. | |
@scratchpad = [] | |
# Calculate the nth Fibonacci number, f(n). | |
def fibo(n) | |
if n <= 1 | |
n | |
else |
/*! | |
* quantize.js Copyright 2008 Nick Rabinowitz. | |
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php | |
*/ | |
// fill out a couple protovis dependencies | |
/*! | |
* Block below copied from Protovis: http://mbostock.github.com/protovis/ | |
* Copyright 2010 Stanford Visualization Group | |
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php |