Skip to content

Instantly share code, notes, and snippets.

View mike-marcacci's full-sized avatar

Mike Marcacci mike-marcacci

View GitHub Profile
@zhenwenc
zhenwenc / buildSchema.js
Last active November 3, 2021 22:48
Generate Apollo API based on remote GraphQL schema merging with schemas for local state
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const https = require('https');
const yargs = require('yargs');
const fetch = require('node-fetch');
const { parse, execute, buildSchema } = require('graphql');
const { makeExecutableSchema } = require('graphql-tools');
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod

When there are so many other projections to chose from, why is it that today the Mercator projection is still such a widely recognized image used to represent the globe? The answer may be simply convention or habit. The inertia of habit is a powerful force.

^Alberto Rios

The main reason Mercator's projection became so popular was because of its navigational usefulness; in his map, straight lines represent lines of constant compass bearing. However, in manipulating the map to ensure this feature, the sizes of countries become hugely distorted. In particular, the southern hemisphere appears much smaller than it is in reality.

^The Guardian

Map projections have become a popular new-journalism meme. With a quick article, you can recap centuries of cartographic history and open peoples eyes to a variety of unusual ways to shape the world. The

@joyrexus
joyrexus / README.md
Last active August 21, 2023 16:59
Node.js streams demystified

A quick overview of the node.js streams interface with basic examples.

This is based on @brycebaril's presentation, Node.js Streams2 Demystified

Overview

Streams are a first-class construct in Node.js for handling data.

Think of them as as lazy evaluation applied to data.

@gre
gre / easing.js
Last active April 23, 2024 04:20
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@samuel
samuel / check_redis.py
Last active October 19, 2019 11:16
Redis health and memory check for Nagios
#!/usr/bin/python
#
# LICENSE: MIT
#
# Copyright (C) 2014 Samuel Stauffer
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation