Skip to content

Instantly share code, notes, and snippets.

View azemetre's full-sized avatar
🎯
Focusing on documentation

Aaron Zemetres azemetre

🎯
Focusing on documentation
View GitHub Profile
@azemetre
azemetre / gist:8776427
Created February 2, 2014 23:11
HTML: Starting Template
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title></title>
<link rel="stylesheet" href="style.css">
</head>
<body>
@azemetre
azemetre / gist:8776537
Created February 2, 2014 23:18
JavaScript: Sexy PubSub
// Works in modern browsers + IE9, but Modernizer has a polyfill baked in for function.bind.
// Hat tip Paul Irish
var o = $( {} );
$.subscribe = o.on.bind(o);
$.unsubscribe = o.off.bind(o);
$.publish = o.trigger.bind(o);
@azemetre
azemetre / gist:8776552
Created February 2, 2014 23:19
CSS: Image Replacement
.ir {
border: 0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@azemetre
azemetre / gist:8776596
Created February 2, 2014 23:22
JavaScript: jQuery PubSub
(function($) {
var o = $( {} );
$.each({
on: 'subscribe',
trigger: 'publish',
off: 'unsubscribe'
}, function( key, api ) {
$[api] = function() {
o[key].apply( o, arguments );
@azemetre
azemetre / gist:8776670
Created February 2, 2014 23:29 — forked from padolsey/gist:527683
JavaScript: Detect IE
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
Qs to ask
How does the engineering culture differ from the overall company culture?
What were some of the biggest changes on the team in the last 6 months?
How did your team come to use your current framework(s)/tech stack?
Did they consider other options?
How did they evaluate tradeoffs between them?
@azemetre
azemetre / f6k.md
Last active January 21, 2024 13:05
for your consideration

Explain Promises like I'm five years old

What does it mean when it is said that JS has first-class functions?

Explain higher order functions?

Explain this

Q: What are the advantages of using ES6 maps over objects? What about using ES6 sets over arrays?

@azemetre
azemetre / debounce.js
Last active August 30, 2019 19:52
JS Qs
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
@azemetre
azemetre / .block
Created June 29, 2020 21:38
fresh block
license: mit
@azemetre
azemetre / dots.js
Last active February 15, 2022 03:14
d3-q
async function drawLineChart() {
// 1. Access data
const dataset = await d3.json("denisvillenuve.json");
const yAccessor = (d) => d.colors;
const xAccessor = (d) => d.colorsTime;
const runtimeAccessor = (d) => d.runtime;
const colorAccessor = (d) => d.colors;
// 2. Create chart dimensions