Skip to content

Instantly share code, notes, and snippets.

ackuser /
Created April 10, 2024 11:02 — forked from mitchellh/
Merge vs. Rebase vs. Squash

I get asked pretty regularly what my opinion is on merge commits vs rebasing vs squashing. I've typed up this response so many times that I've decided to just put it in a gist so I can reference it whenever it comes up again.

I use merge, squash, rebase all situationally. I believe they all have their merits but their usage depends on the context. I think anyone who says any particular strategy is the right answer 100% of the time is wrong, but I think there is considerable acceptable leeway in when you use each. What follows is my personal and professional opinion:

ackuser / index.html
Created January 24, 2024 15:01 — forked from laurakelly/index.html
Connecting Two Points with a Line in D3.js
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="style.css">
<div id="graph">
<h1>Connecting Two Points with a Line in D3.js</h1>
ackuser / mat-dynamic-table.component.ts
Created January 17, 2024 12:07 — forked from rakia/mat-dynamic-table.component.ts
Material Dynamic Table Angular component - typescript part
* Table component that accepts column and row definitions in its content to be registered to the table.
selector: 'mat-dynamic-table',
templateUrl: './mat-dynamic-table.component.html',
styleUrls: ['./mat-dynamic-table.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
export class MatDynamicTableComponent<T> implements OnInit, OnChanges, AfterContentInit {
ackuser /
Created December 7, 2023 12:00 — forked from tophtucker/
d3 color-legend example

In response to a question on Twitter by @everybody_kurts:

“Hi @mbostock, I was looking at your stacked area chart at At the end of the file, you import swatches from "@d3/color-legend". I tried finding this on npmjs but to no avail. Is this exclusive to @observablehq only?”

This shows how to use the swatches function from the @d3/color-legend notebook in a plain HTML page. The example data for the swatches (the color scale and margin) is copied from the @d3/stacked-area-chart notebook.

ackuser /
Created July 4, 2023 04:28 — forked from arthur-e/
Installation and use of topojson and geojson command line interfaces for simplifying OGC geometries


# Requires Node.js and NPM
sudo npm install -g topojson

# Install the geojson-cli
sudo npm install -g geojson


ackuser / .block
Created July 1, 2023 06:53 — forked from mbostock/.block
Merging States
license: gpl-3.0
ackuser /
Created June 20, 2023 06:58 — forked from LeZuse/
Install node on Apple Silicon M1 both ARM and x86 (Rosetta)

Node.js on Apple Silicon

Node Version Manager ( works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.


  • find a way how to run the same node version on both platforms
ackuser /
Created May 12, 2023 07:19 — forked from adrienjoly/
Fix `dyld[]: missing symbol called` errors when running Node.js programs on M1 Macs


If you're getting this kind of error when running Node.js programs with binary dependencies that don't support M1 yet, e.g.:

$ yarn test
dyld[51175]: missing symbol called
dyld[51176]: missing symbol called
ackuser / paginated.interface.ts
Created May 3, 2023 09:22 — forked from tugascript/paginated.interface.ts
A Generic Paginated Type for GraphQL in NestJS code first approach
export interface IEdge<T> {
cursor: string;
node: T;
interface IPageInfo {
endCursor: string;
hasNextPage: boolean;
ackuser / security.conf
Created April 17, 2023 08:15 — forked from ambroisemaupate/security.conf
Nginx CSP example
# config to don't allow the browser to render the page inside an frame or iframe
# and avoid clickjacking
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri
add_header X-Frame-Options SAMEORIGIN;
# when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header,
# to disable content-type sniffing on some browsers.
# currently suppoorted in IE > 8