Skip to content

Instantly share code, notes, and snippets.

@raftheunis87
raftheunis87 / hyperjs.md
Last active August 22, 2024 13:51
Hyper.js + Hyper.js Plugins + ZSH + Starship + Fira Code + Dark Theme - (macOS)

Hyper.js

@pgilad
pgilad / Instructions.md
Last active March 27, 2024 12:59
Generate SSL Certificate for use with Webpack Dev Server (OSX)

Generate private key

$ openssl genrsa -out private.key 4096

Generate a Certificate Signing Request

openssl req -new -sha256 \
@stephanschubert
stephanschubert / RGB to CMYK with caching
Last active August 30, 2015 14:24
Convert CMYK to RGB with automatic caching
cmyk = Hash.new do |cache, rgb|
cmy = rgb.map { |color| 255 - color }
k = cmy.min
cache[rgb] = cmy.map { |color| color - k } + [k]
end
# Usage
cmyk[ [128, 42, 23] ] # => [0, 86, 105, 127]