Skip to content

Instantly share code, notes, and snippets.

@ackuser
ackuser / networkmanager-wifi-powersave.md
Created October 14, 2024 14:51 — forked from jcberthon/networkmanager-wifi-powersave.md
NetworkManager Wi-Fi powersaving configuration

NetworkManager WiFi Power Saving

NetworkManager supports WiFi powersaving but the function is rather undocumented.

From the source code: wifi.powersave can have the following value:

  • NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
  • NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
  • NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@ackuser
ackuser / merge_vs_rebase_vs_squash.md
Created April 10, 2024 11:02 — forked from mitchellh/merge_vs_rebase_vs_squash.md
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
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>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="graph">
<h1>Connecting Two Points with a Line in D3.js</h1>
</div>
@ackuser
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.
*/
@Component({
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
ackuser / README.md
Created December 7, 2023 12:00 — forked from tophtucker/README.md
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 https://observablehq.com/@d3/stacked-area-chart. 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
ackuser / GeoJSON_TopoJSON.md
Created July 4, 2023 04:28 — forked from arthur-e/GeoJSON_TopoJSON.md
Installation and use of topojson and geojson command line interfaces for simplifying OGC geometries

Installation

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

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

Tasks

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

Node.js on Apple Silicon

Node Version Manager (https://github.com/nvm-sh/nvm) 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.

TODO

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

Problem

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