Skip to content

Instantly share code, notes, and snippets.

View georapbox's full-sized avatar

George Raptis georapbox

View GitHub Profile
@georapbox
georapbox / easings.css
Created September 28, 2020 07:43 — forked from argyleink/easings.css
Handy CSS properties for easing functions
:root {
--ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
--ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
--ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22);
--ease-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06);
--ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);
--ease-in-circ: cubic-bezier(0.6, 0.04, 0.98, 0.335);
--ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
--ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
--ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
function partition(inputArray, callback) {
const result = {};
for (const [indexOfValue, value] of inputArray.entries()) {
const propertyKey = callback(value, indexOfValue);
if (propertyKey === null || propertyKey === '') {
continue;
}
if (!{}.hasOwnProperty.call(result, propertyKey)) {
result[propertyKey] = [];
}

What Hiring Should Look Like

This is definitely not the first time I've written about this topic, but I haven't written formally about it in quite awhile. So I want to revisit why I think technical-position interviewing is so poorly designed, and lay out what I think would be a better process.

I'm just one guy, with a bunch of strong opinions and a bunch of flaws. So take these suggestions with a grain of salt. I'm sure there's a lot of talented, passionate folks with other thoughts, and some are probably a lot more interesting and useful than my own.

But at the same time, I hope you'll set aside the assumptions and status quo of how interviewing is always done. Just because you were hired a certain way, and even if you liked it, doesn't mean that it's a good interview process to repeat.

If you're happy with the way technical interviewing currently works at your company, fine. Just stop, don't read any further. I'm not going to spend any effort trying to convince you otherwise.

@georapbox
georapbox / readFileInChunks.js
Last active June 13, 2019 12:23 — forked from alediaferia/tiny_uploader.js
A tiny snippet for reading files chunk by chunk in plain JavaScript
/**
* Read files chunk by chunk.
*
* @param {File} file The file object to read in chunks.
* @param {Object} [options={}] Options object to override defaults.
* @param {Number} [chunkSize= 64 * 1024] The chunk size (in bytes) to be used. Default is 64KB.
* @param {Boolean} [binary=false] If true chunks will be read through FileReader.readAsArrayBuffer otherwise as FileReader.readAsText. Default is `false`.
* @param {Function} [chunkReadCallback=()=>{}] Optional function that accepts the read chunk as its only argument.
* If `binary` option is set to `true`, this function will receive an instance of `ArrayBuffer`, otherwise a `String`.
* @param {Function} [chunkErrorCallback=()=>{}] Optional function that accepts an object of type `FileReader.error`.
@georapbox
georapbox / client.js
Created May 15, 2017 12:51 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
@georapbox
georapbox / fillLocalStorage.js
Created November 9, 2016 11:56 — forked from tbassetto/fillLocalStorage.js
Fill localStorage until the last byte possible
// Only count bytes inserted as values, not counting keys...
(function() {
localStorage.clear();
var nbBytes = 5000, // about 0.5Mb
oneByte = 'x',
i = 0,
totalBytesInserted = 0;
function repeat(string, length) {
@georapbox
georapbox / README
Last active August 29, 2015 14:03 — forked from joelambert/README
Drop in replace functions for setTimeout() & setInterval() that
make use of requestAnimationFrame() for performance where available
http://www.joelambert.co.uk
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php