Skip to content

Instantly share code, notes, and snippets.

View idfunctor's full-sized avatar
🎯
Focusing

idfunctor idfunctor

🎯
Focusing
  • Whalar
  • Tallinn
  • 23:23 (UTC +03:00)
View GitHub Profile
@idfunctor
idfunctor / tailwind-radial-progress-bar.txt
Created November 19, 2023 21:36 — forked from eYinka/tailwind-radial-progress-bar.txt
Tailwind CSS Radial Progress Bar
// Inspired by Tailwind Daisy UI progress bar: https://daisyui.com/components/radial-progress/
// This is a custom-made progress circular/radial progress bar with centered percentage text.
// Tested with Tailwind 3.x. Should work with lower versions of Tailwind CSS as well.
STEP 1: Add the following custom CSS:
.progress-ring__circle {
stroke-dasharray: 400, 400;
transition: stroke-dashoffset 0.35s;
transform: rotate(-90deg);

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@idfunctor
idfunctor / foo.ts
Created July 14, 2021 10:22 — forked from OliverJAsh/foo.ts
TypeScript: infer function parameter as a tuple, not an array
{
declare const fn: <T>(fn: (t: T) => void, t: T) => void;
fn(
(t) => {
// $ExpectType [number, string]
// ❌
// Actual: (string | number)[)
t;
},
@idfunctor
idfunctor / authSaga.js
Created November 13, 2018 19:46
authSaga.js
import { takeEvery, takeLatest } from 'redux-saga';
import { call, put, fork, select } from 'redux-saga/effects';
import { push } from 'react-router-redux';
import { toastr } from 'react-redux-toastr';
import { destroy } from 'redux-form';
import * as groupsApi from 'groupsModule/api';
import * as selectors from 'authModule/redux/selectors';
import * as layoutActions from 'layoutModule/redux/actions';
import * as actions from 'authModule/redux/actions';
import * as api from 'authModule/api';
@idfunctor
idfunctor / buildSitemap.js
Created September 22, 2018 04:34 — forked from evantahler/buildSitemap.js
35 lines to build a sitemap for next.js projects
#! /usr/bin/env node
// I am ./bin/buildSitemap.js
const path = require('path')
const glob = require('glob')
const fs = require('fs')
const SITE_ROOT = process.env.SITE_ROOT || 'https://www.actionherojs.com'
const SOURCE = process.env.SOURCE || path.join(__dirname, '..', 'pages', '/**/*.js')
const DESTINATION = process.env.DESTINATION || path.join(__dirname, '..', 'static', 'sitemap.xml')
@idfunctor
idfunctor / multiFilter.js
Last active April 13, 2018 11:17 — forked from jherax/arrayFilterFactory.1.ts
Filters an array of objects with multiple criteria.
/**
* Filters an array of objects with multiple criteria.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria as the property names
* @return {Array}
// */
// function multiFilter(array, filters) {
// const filterKeys = Object.keys(filters);
// // filters all elements passing the criteria
@idfunctor
idfunctor / apt-get update
Created August 15, 2017 18:13 — forked from dibmartins/apt-get update
apt-get update
apt-get clean
rm -rf /var/lib/apt/lists/*
apt-get clean
apt-get update
apt-get upgrade