Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
import React, { useEffect, useState } from 'react' | |
import PropTypes from 'prop-types' | |
import Helmet from 'react-helmet' | |
import classNames from 'classnames/bind' | |
import s from './WistiaEmbed.module.scss' | |
const cn = classNames.bind(s) | |
const WistiaEmbed = ({ id, play = false, style, options }) => { | |
// const el = useRef() |
input[type="search"]::-webkit-search-cancel-button { | |
--size: 11px; | |
--background: #7F7F7F; | |
--icon: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI3IiBoZWlnaHQ9IjciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY2xhc3M9ImZlYXRoZXIgZmVhdGhlci14Ij48cGF0aCBkPSJNMTggNkw2IDE4TTYgNmwxMiAxMiIvPjwvc3ZnPgo="); | |
-webkit-appearance: none; | |
height: var(--size); | |
width: var(--size); | |
border-radius: 50%; | |
background: var(--background) var(--icon) 50% 50% no-repeat; | |
} |
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf | |
// Remove any duplicates from an array of primitives. | |
const unique = [...new Set(arr)] | |
// Sleep in async functions. Use: await sleep(2000). | |
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms))); | |
// or | |
const sleep = util.promisify(setTimeout); |
class Book < Airrecord::Table | |
class Endorser < Airrecord::Table | |
self.base_key = "" | |
self.table_name = "Endorser" | |
end | |
self.base_key = "" | |
self.table_name = "Books" | |
has_many :endorsements, class: 'Book::Endorser', column: 'Endorsements' |
var PurdyPercent = function (num, options) { | |
this.settings = { | |
hide_decimal_on_whole : true, | |
decimals : 2, | |
truncate : false, // (soon) | |
match_decimals: true, // forces floats to match defined decimal count | |
postfix : '%' | |
}; | |
// helper methods |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
BEGIN { | |
require 'net/http' | |
Net::HTTP.module_eval do | |
alias_method '__initialize__', 'initialize' | |
def initialize(*args,&block) | |
__initialize__(*args, &block) |
This is how you can do truly semantic clearfixing easily in Sass.
The @extend directive is used to inherit the .group class for other selectors. Sass takes care of spreading the selectors around for you.
This script is a replacement for livereload server component designed for working with Rails. It watches the filesystem with FS Events (Mac OS X) rather than with EventMachine. This is better for large projects for wich EventMachine fails with "too many open files" exception.
Sass is supported; .sass files can also be stored in "app/styles/" directory. Compass is detected if "config/compass.rb" file exists.
Download this script to somewhere in your PATH and make it executable. You can name it something different than "livereload" if you want to try this and the official gem executable in parallel.