Skip to content

Instantly share code, notes, and snippets.

@bryant988
bryant988 / zillow.js
Last active March 28, 2024 14:21
Zillow Image Downloader
/**
* NOTE: this specifically works if the house is for sale since it renders differently.
* This will download the highest resolution available per image.
*/
/**
* STEP 1: Make sure to *SCROLL* through all images so they appear on DOM.
* No need to click any images.
@ceving
ceving / Web Component for Copyright Years.md
Last active March 28, 2024 14:17
Web Component for Copyright Years
@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 14:16
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@squarism
squarism / iterm2.md
Last active March 28, 2024 14:16
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@michiakig
michiakig / ants.clj
Created July 19, 2011 22:37
Clojure ant sim from Rich Hickey
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
; which can be found in the file CPL.TXT at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
;dimensions of square world
@alexedwards
alexedwards / Makefile
Created May 2, 2023 16:04
Makefile targets for working with sqlite
## db/connect: create to the local database
.PHONY: db/connect
db/connect:
sqlite3 db.sqlite
## db/migrations/new name=$1: create a new migration
.PHONY: db/migrations/new
db/migrations/new:
go run -tags 'sqlite3' github.com/golang-migrate/migrate/v4/cmd/migrate@latest create -seq -ext=.sql -dir=./resources/migrations ${name}
@nevillepark
nevillepark / README.md
Last active March 28, 2024 14:11
CBC radio stream URLs

CBC Radio Stream URLs

Using these URLs, you can listen to CBC radio streams with applications like VLC or Transistor. The files are M3U playlists, so you can use them as-is, edit them to suit your tastes, or use individual URLs.

This playlist contains the .m3u8 URLs from the CBC Listen website, which uses the HLS (HTTP Live Streaming) protocol. The audio stream is broken up into multiple tiny files, which are then fed into the .m3u8 playlist file that delivers them to your computer in the right order. This should work with modern media players.

This legacy playlist uses good old-fashioned MP3 streams found on PublicRadioFan.com. It will work with older programs like Winamp that don't support HLS. I don't know how lo

@cassidoo
cassidoo / base-css.md
Created May 4, 2022 06:37
Base CSS for a plain HTML document

If you don't want to deal with styling a mostly text-based HTML document, plop these lines in and it'll look good:

html {
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  font-size: 1.3em;
  max-width: 40rem;
  padding: 2rem;
  margin: auto;
 line-height: 1.5rem;
@zingaburga
zingaburga / sve2.md
Last active March 28, 2024 14:08
ARM’s Scalable Vector Extensions: A Critical Look at SVE2 For Integer Workloads

ARM’s Scalable Vector Extensions: A Critical Look at SVE2 For Integer Workloads

Scalable Vector Extensions (SVE) is ARM’s latest SIMD extension to their instruction set, which was announced back in 2016. A follow-up SVE2 extension was announced in 2019, designed to incorporate all functionality from ARM’s current primary SIMD extension, NEON (aka ASIMD).

Despite being announced 5 years ago, there is currently no generally available CPU which supports any form of SVE (which excludes the [Fugaku supercomputer](https://www.fujitsu.com/global/about/innovation/

@ShabbirHasan1
ShabbirHasan1 / LowLatencyLogging.md
Last active March 28, 2024 14:07
Low Latency Logging

Low latency logging 🙋 seeking help & advice How would you design a logging system for a low latency application to not have much impact on the latency? One thing comes to my mind is, not doing any formatting on the hot path and send raw data through a channel to another thread. In that thread, format the log appropriately and use tracing, tracing-subscriber, tracing-appender to log to a file. Is there any other suggested approaches or crates for that kind of problem? Thanks in advance.

Response By u/matthieum: