Skip to content

Instantly share code, notes, and snippets.

View danimesq's full-sized avatar
💭
I may be slow to respond.

Daniella Mesquita danimesq

💭
I may be slow to respond.
View GitHub Profile
@dead-claudia
dead-claudia / mithril-react.mjs
Last active September 27, 2021 12:21
Mithril to React adapters
import m from "mithril"
import React, {useLayoutEffect, Component} from "react"
import ReactDOM from "react-dom"
// Bottom-up to Mithril, top-down to React
export function useMithril(ref, view) {
useLayoutEffect(() => { m.render(ref.current, view()) })
useLayoutEffect(() => () => { m.render(ref.current, null) }, [])
}
@simonw
simonw / wget.md
Created December 9, 2016 06:38
Recursive wget ignoring robots
$ wget -e robots=off -r -np 'http://example.com/folder/'
  • -e robots=off causes it to ignore robots.txt for that domain
  • -r makes it recursive
  • -np = no parents, so it doesn't follow links up to the parent folder
@martinboy
martinboy / gitignore-symlinks.sh
Last active December 9, 2022 20:37
Add all symlinks to a .gitignore file that aren't in there already.