Skip to content

Instantly share code, notes, and snippets.

View antoninadert's full-sized avatar
🎯
Focusing

Antonin Adert antoninadert

🎯
Focusing
View GitHub Profile
import React, { useState, useEffect } from 'react'
import styled from 'styled-components'
import { useCanvas } from 'utils/hooks'
import debounce from 'lodash/debounce'
export default function Glow() {
const [ref, setRef] = useState<HTMLCanvasElement | null>(null)
const [boxes, setBoxes] = useState<Box[]>([])
const [ctx, width, height] = useCanvas(ref)
const moving = useMouseMoving()
@lega911
lega911 / malina-app.html
Last active September 19, 2020 22:29
Small benchmark
<script>
let todos = [];
let duration = '';
function timeit(fn) {
let start = Date.now();
fn();
setTimeout(() => {
duration += ' + ' + (Date.now() - start);
}, 10);
@sleepyfox
sleepyfox / 2019-07-25-users-hate-change.md
Last active December 10, 2023 18:20
'Users hate change'

'Users hate change'

This week NN Group released a video by Jakob Nielsen in which he attempts to help designers deal with the problem of customers being resistant to their new site/product redesign. The argument goes thusly:

  1. Humans naturally resist change
  2. Your change is for the better
  3. Customers should just get used to it and stop complaining

There's slightly more to it than that, he caveats his argument with requiring you to have of course followed their best practices on product design, and allows for a period of customers being able to elect to continue to use the old site, although he says this is obviously only a temporary solution as you don't want to support both.

How To Clone Scrypt Based Altcoins for Fun and Profit

Wait a second, why would you want to give out the secrets?!? Because its not a secret anymore and besides, why shouldn't everyone and their neighbors be able to create a plethora of these useless yet exciting math bits? The information in this article took me a few weeks to compile and what works for me is not guaranteed to work for you. Please use this guide as a starting point to learn a bit about C programming and compiling software.

@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version