Skip to content

Instantly share code, notes, and snippets.

View kenkoro's full-sized avatar
🤍
always learning

kenkoro kenkoro

🤍
always learning
View GitHub Profile

Adopted from here https://topaxi.codes/use-npm-without-root-or-sudo-rights/

I'm saving this as a gist and modifying it to ensure that if the original blog post disappears it lives on somewhere.

Added some notes for Ubuntu 18.04 and similar.

Today we're going to setup our npm installation to be used without root or sudo rights.

By default, if you install packages globally with npm, npm tries to install them into a system directory (i.e. /usr/local/lib/node_modules). With the next steps, we're going to use your home directory for those files.

@kenkoro
kenkoro / PullToRefreshLazyColumn.kt
Last active July 17, 2024 11:59
Pull-to-refresh gesture support
package com.kenkoro.ui.pull.to.refresh
import ...
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun <T> PullToRefreshLazyColumn(
modifier: Modifier = Modifier,
items: List<T>,
content: @Composable (T) -> Unit,