Skip to content

Instantly share code, notes, and snippets.


Zach Sherman zsherman

View GitHub Profile
View gist:975a7c9a278af7491ecca89f4141ca90
type = "stdin"
type = "statsd"
inputs = ["source0"]
# 2022-08-25T19:17:49.988433Z ERROR vector::cli: Configuration error. error=missing field `mode` for key `sinks.sink0`
prologic /
Last active Sep 30, 2022
Learn Go in ~5mins
kvnxiao /
Last active Aug 25, 2022

Awesome Go

Build Status Awesome Slack Widget Netlify Status

patreon avelino financial support to Awesome Go

A curated list of awesome Go frameworks, libraries and software. Inspired by awesome-python.


karol-majewski / withDefaults.tsx
Last active Jun 11, 2020
Functional composition for React props
View withDefaults.tsx
import * as React from 'react';
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
* Supplies default props.
export function withDefaults<T extends React.ComponentType<any>, U extends Partial<React.ComponentProps<T>>>(
Component: T,
defaults: U,
atanumallick / LICENSE.txt
Last active Mar 9, 2022
D3 Rotating Globe with Location Marker
View LICENSE.txt
MIT License
Copyright (c) 2018-2022 Atanu Mallick
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 the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
yossorion /
Last active Sep 12, 2022
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

bvaughn /
Last active Jun 22, 2022
React lifecycle cheatsheet

React lifecycle cheatsheet

Method Side effects1 State updates2 Example uses
componentWillMount Constructor equivalent for createClass
render Create and return element(s)
componentDidMount DOM manipulations, network requests, etc.
componentWillReceiveProps Update state based on changed props

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.

Effective Engineer - Notes

What's an Effective Engineer?

alysonla / active-issues.sql
Last active Jul 17, 2022
Queries that power the open source section of the 2016 Octoverse report
View active-issues.sql
-- Active issues
-- Count of total active issues in the specified time frame
-- Source: githubarchive public data set via Google BigQuery
COUNT(DISTINCT JSON_EXTRACT_SCALAR(events.payload, '$')) AS events_issue_count
FROM (SELECT * FROM TABLE_DATE_RANGE([githubarchive:day.],TIMESTAMP('2015-09-01'),TIMESTAMP('2016-08-31')))
AS events
-- 10,723,492 active issues
iammerrick / PinchZoomPan.js
Last active Nov 8, 2021
React Pinch + Zoom + Pan
View PinchZoomPan.js
import React from 'react';
const MIN_SCALE = 1;
const MAX_SCALE = 4;
const SETTLE_RANGE = 0.001;
const ANIMATION_SPEED = 0.04;
const INITIAL_X = 0;