Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
👨‍💻

Zach Sherman zsherman

💭
👨‍💻
View GitHub Profile
View gist:975a7c9a278af7491ecca89f4141ca90
[sources.source0]
type = "stdin"
[sinks.sink0]
type = "statsd"
inputs = ["source0"]
# 2022-08-25T19:17:49.988433Z ERROR vector::cli: Configuration error. error=missing field `mode` for key `sinks.sink0`
@prologic
prologic / LearnGoIn5mins.md
Last active Sep 30, 2022
Learn Go in ~5mins
View LearnGoIn5mins.md
@kvnxiao
kvnxiao / awesome-go-sorted-by-stars-2019-12-30.md
Last active Aug 25, 2022
awesome-go-sorted-by-stars-2019-12-30.md
View awesome-go-sorted-by-stars-2019-12-30.md

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.

Contributing

@karol-majewski
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
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
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active Sep 12, 2022
What I Wish I'd Known About Equity Before Joining A Unicorn
View what-i-wish-id-known-about-equity-before-joining-a-unicorn.md

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
bvaughn / react-lifecycle-cheatsheet.md
Last active Jun 22, 2022
React lifecycle cheatsheet
View react-lifecycle-cheatsheet.md

React lifecycle cheatsheet

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

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
alysonla / active-issues.sql
Last active Jul 17, 2022
Queries that power the open source section of the 2016 Octoverse report https://octoverse.github.com/2016/
View active-issues.sql
-- Active issues
-- Count of total active issues in the specified time frame
-- Source: githubarchive public data set via Google BigQuery http://githubarchive.org/
SELECT
COUNT(DISTINCT JSON_EXTRACT_SCALAR(events.payload, '$.issue.id')) 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
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 ADDITIONAL_LIMIT = 0.2;
const DOUBLE_TAP_THRESHOLD = 300;
const ANIMATION_SPEED = 0.04;
const RESET_ANIMATION_SPEED = 0.08;
const INITIAL_X = 0;