Skip to content

Instantly share code, notes, and snippets.

@bpsib
bpsib / BBC-Radio-HLS.m3u
Last active March 29, 2024 06:30 — forked from stengland/BBC-Radio.m3u
BBC Radio Streams
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Xtra
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_1xtra/bbc_1xtra.isml/bbc_1xtra-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Dance
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one_dance/bbc_radio_one_dance.isml/bbc_radio_one_dance-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Relax
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one_relax/bbc_radio_one_relax.isml/bbc_radio_one_relax-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 2
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active March 29, 2024 06:27
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@vasanthk
vasanthk / System Design.md
Last active March 29, 2024 06:27
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@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;
@bennlee
bennlee / fix-input-source-switching-delay-in-m1-macbook.md
Last active March 29, 2024 06:23
M1 맥에서 한영키 전환 딜레이 해결하기

M1 맥북에서 한영키 전환 딜레이 해결하기

맥에서 Caps Lock을 한/영 전환키로 사용하면서부터 딜레이가 생기거나, 제대로 바뀌지 않는 고질적인 문제가 꾸준히 발생해왔다. 대소문자를 고정하는 Caps Lock기능과 한/영 전환 기능을 누른 시간에 기반하여 구분하는 과정에서 생긴 문제로 추정되지만, Caps Lock기능을 해제해도 여전히 문제가 발생한다. 이에 사용자들은 karabiner-elements등의 편법을 통해 Caps Lock키를 실제로 사용하지 않는 F18등의 키로 매핑하여 해결해 왔다.

하지만, Apple Silicon을 탑재한 기기들에서는 다음과 같은 문제가 있다.

  • karabiner-elements가 제대로 지원되지 않는 이슈가 있어 hammerspoon등의 차선책을 사용해야한다.
  • M1 이전까지의 맥과는 다르게 키매핑만으로 문제가 완전히 해결되지 않는다.
@OrionReed
OrionReed / DOM3D.js
Last active March 29, 2024 06:22
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; // ¯\\_(ツ)_/¯
@stevdza-san
stevdza-san / RequestState.kt
Last active March 29, 2024 06:21
Useful wrapper class for handling the data in Jetpack Compose
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.togetherWith
import androidx.compose.runtime.Composable
sealed class RequestState<out T> {
data object Idle : RequestState<Nothing>()
data object Loading : RequestState<Nothing>()
@amk221
amk221 / placeholder.css
Last active March 29, 2024 06:19
Prosemirror placeholder plugin approach
.ProseMirror[data-placeholder]::before {
color: global.$placeholder-colour;
position: absolute;
content: attr(data-placeholder);
pointer-events: none;
}