This Web Components keeps the year in your copyright notice up-to-date.
export { CopyrightYearElement }
const name = "copyright-year";
class CopyrightYearElement extends HTMLSpanElement {
# frozen_string_literal: true | |
module Fingerprinting | |
def full_fingerprint | |
generate_fingerprint( | |
ip_fingerprint, | |
browser_fingerprint | |
) | |
end |
# Use this validator like this | |
# | |
# class User < ApplicationRecord | |
# validates :profile_link, url: true | |
# end | |
class UrlValidator < ActiveModel::EachValidator | |
def validate_each(record, attribute, value) | |
unless valid_url?(value) | |
record.errors.add(attribute, :invalid_url) |
The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.
Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.
This repo also contains a bundled version of npm that has a new command, asset
. You can read the documentation for and goals of that comma
# Keep delayed job workers running using systemd on ubuntu | |
# Usage | |
# Start "sudo systemctl start delayed_job@{0..3}" to start 4 worker instances | |
# Enable "sudo systemctl enable delayed_job@{0..3}" to enable 4 worker instances | |
# Restart "sudo systemctl restart delayed_job@{0..3}" to restart 4 worker instances | |
# Disable "sudo systemctl disable delayed_job@{0..3}" to disable 4 worker instances | |
# Stop "sudo systemctl stop delayed_job@{0..3}" to stop 4 worker instances | |
[Unit] | |
Description=Delayed Job Worker %i |
---/usr/share/source-highlight/lang.map.old | |
+++/usr/share/source-highlight/lang.map | |
@@ -169,3 +169,5 @@ | |
groovy = groovy.lang | |
json = json.lang | |
feature = feature.lang | |
+yaml = yaml.lang | |
+yml = yaml.lang |
import React from 'react'; | |
import { shallow } from 'enzyme'; | |
import MyComponent from '../src/my-component'; | |
const wrapper = shallow(<MyComponent/>); | |
describe('(Component) MyComponent', () => { | |
it('renders without exploding', () => { | |
expect(wrapper).to.have.length(1); | |
}); |
That is is basically a "fork" of blog article i'm constantly returning to. It seems that the blog is down:
Dave Bass proposed this which I picked up for my implementation (here for an 8-chars token):
require "active_record" | |
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:") | |
ActiveRecord::Migration.class_eval do | |
create_table(:records) do |t| | |
t.string :column | |
end | |
end | |
data = 50_000.times.map { |i| Hash[column: "Column #{i}"] } |
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body.loading #splash { | |
opacity: 1; | |
} | |
#splash { | |
position: absolute; | |
top: 0; |